{
if (txtcgst.Text != "")
GlobalVariable.CGST = Convert.ToDouble(txtcgst.Text);
else
GlobalVariable.CGST = 0.00;
if (txtsgst.Text != "")
GlobalVariable.SGST = Convert.ToDouble(txtsgst.Text);
else
GlobalVariable.SGST = 0.00;
if (txtigst.Text != "")
GlobalVariable.IGST = Convert.ToDouble(txtigst.Text);
else
GlobalVariable.IGST = 0.00;
if (txtsgst.Text == "")
{
MessageBox.Show("Please Provide Details!");
txt_note1.Focus();
return;
}
{
cmd = new SqlCommand("update GSTsetup set Sgst=@Sgst,Cgst=@Cgst,Igst=@Igst ", con);
con.Open();
//cmd.Parameters.AddWithValue("@id", ID);
cmd.Parameters.AddWithValue("@Sgst", txtsgst.Text);
cmd.Parameters.AddWithValue("@Cgst", txtcgst.Text);
cmd.Parameters.AddWithValue("@Igst", txtigst.Text);
cmd.ExecuteNonQuery();
MessageBox.Show("Record Updated Successfully");
con.Close();
}
//this.Close();
}
class GlobalVariable
{
public static double CGST { get; set; }
public static double SGST { get; set; }
public static double IGST { get; set; }
}
{
public static double CGST { get; set; }
public static double SGST { get; set; }
public static double IGST { get; set; }
}


Rafnas T PRank #280 · 8.8K reputationPosted Jun 22, 2017, 1:01 AM EDT
Amresh SRank #5,790 · 286 reputationPosted Jun 22, 2017, 12:19 AM EDT
Rajkiran SwainRank #165 · 14.4K reputationPosted Jun 22, 2017, 8:32 AM EDT