public clsSLBO GetValue(string vSLID) { clsSLBO SlBO = new clsSLBO(); SqlCommand cmd = new SqlCommand(); SqlDataReader Sread; //Double tmp_op_bal = 0; cmd.CommandText = "select Finyr,BrCode,GLID,SLID,SL_L_NAME,SLADD1,SLADD2,SLCITY,SLPIN,SLFAX,SLPHONE,SLCONT_PERS,REMARKS,OP_BAL,STATUS,GSTIN from TblSLMast Where SLID = '" + vSLID + "' and finyr='" + Global.finyr + "' and BrCode='" + Global.branch + "' order by SL_L_Name"; cmd.Connection = clsConnection.Conn; Sread = cmd.ExecuteReader(); while (Sread.Read()) { if (!Sread.IsDBNull(0)) { //tmp_op_bal = Convert.ToDouble(string.IsNullOrEmpty(Sread.GetValue(13).ToString()) ? 0 : Sread.GetValue(13)); SlBO.SetValue(Convert.ToString(Sread.GetValue(0)), Convert.ToString(Sread.GetValue(1)), Convert.ToString(Sread.GetValue(2)), Convert.ToString(Sread.GetValue(3)), Convert.ToString(Sread.GetValue(4)), Convert.ToString(Sread.GetValue(5)), Convert.ToString(Sread.GetValue(6)), Convert.ToString(Sread.GetValue(7)), Convert.ToString(Sread.GetValue(8)), Convert.ToString(Sread.GetValue(9)), Convert.ToString(Sread.GetValue(10)), Convert.ToString(Sread.GetValue(11)), Convert.ToString(Sread.GetValue(12)), Convert.ToDouble(string.IsNullOrEmpty(Sread.GetValue(13).ToString()) ? 0 : Sread.GetValue(13)), Convert.ToString(Sread.GetValue(14)), Convert.ToString(Sread.GetValue(15))); } } Sread.Close(); cmd.Dispose(); return(SlBO); }
public string SaveData(string vfinyr, string vBrCode, string vGLID, string vSLID, string vSL_L_NAME, string vSLADD1, string vSLADD2, string vSLCITY, string vSLPIN, string vSLFAX, string vSLPHONE, string vSLCONT_PERS, string vREMARKS, Double vop_bal, string vSTATUS, string gstin) { SLBO.SetValue(vfinyr, vBrCode, vGLID, vSLID, vSL_L_NAME, vSLADD1, vSLADD2, vSLCITY, vSLPIN, vSLFAX, vSLPHONE, vSLCONT_PERS, vREMARKS, vop_bal, vSTATUS, gstin); return(SLDAL.SaveData(SLBO)); }