“I fancy a biscuit,” said Samantha. – And I do (how could you tell?) although that’s not the point. My point is you need a comma after biscuit and ‘said’ is in lowercase because the following words form a tagline. It’s a tagline because it refers to how the dialogue is said or who says it.
“I fancy a biscuit.” Samantha grabbed the tin. – There’s no tagline. Therefore you need a full stop and to start a new sentence.
“I fancy a biscuit.” She smiled. – This doesn’t refer to how the speech is said. Therefore you need a full stop.
“Where are my biscuits?” shouted Samantha. – You need lowercase into the tagline. Think of it as part of the sentence.
“My biscuits!” she cried. – Again, lowercase. Whether it’s a exclamation mark, comma, or question mark
"My biscuit," she said, "are gone." - As the sentence continues, a comma is used and lowercase is needed afterwards.
Hope that sums it up. Once you know how it goes, it’s pretty simple stuff. I’m off to have a cuppa now.