Please help me I am attaching image.Send me code in C# if u know
thankin
g u
g uKnow the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Dorababu MekaRank #457 · 5.5K reputationPosted Sep 24, 2012, 1:57 AM EDT
arun darly6 reputationPosted Sep 24, 2012, 2:20 AM EDT
I want to generate code fore auto generation of number is in the above mentioned type current date and selected shift +1
That is today date is 24-09-12, and if selected shift is A.M then
Number should generate like 24-09-12-A.M-1, 24-09-12-A.M-2, 24-09-12-A.M-3………
thanking you
Dorababu MekaRank #457 · 5.5K reputationPosted Sep 24, 2012, 3:23 AM EDT
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
if (dataGridView1.Rows[i].Cells[0].Value == null)
{
DateTime dt = DateTime.Now;
string str = dt.ToString("dd-MM-yyyy-t.\\M");
str=str+"-"+i; // Here you will get like 24-09-2012-P.M-0 if you want to change for 1 means assign I to another variable and increment it by 1
dataGridView1.Rows[i].Cells[0].Value = str;
}
}
Later part if you need to increment it by 1;