public ThreeSConfiguration GetCompanyConfig() { DataRow MyDr; ThreeSConfiguration ED = new ThreeSConfiguration(); MyDr = GetDataRowAccount("Select * From tblcompanyconfig", "Get Company Config"); ED.CurrentAccPeriod = int.Parse(MyDr["CurrentAccPeriod"].ToString()); ED.CompanyID = int.Parse(MyDr["Sysid"].ToString()); return ED; }
public void UpdateSysConfig(ThreeSConfiguration MyCnf) { String Str1=""; String Respond; //Str1 = "Update tblcompanyconfig Set " //+ "CompanyName='" + MyCnf.CompanyName + "'" //+ ",Address1='" + MyCnf.Add1 + "'" //+ ",Address2='" + MyCnf.Add2 + "'" //+ ",TPnumber='" + MyCnf.Telephone + "'" //+ ",FaxNumber='" + MyCnf.Fax + "'" //+ ",Email='" + MyCnf.EmailAddress + "'" //+ ",BackGroundPictureParth='" + MyCnf.BackgoundPic + "'" //+ ",ReportPath=" + MyCnf.ReportPath + "'" //+ ",LastPurchaseBill='" + MyCnf.CuPurchaseBillnumber + "'" //+ ",LastSalesBill='" + MyCnf.CuSalesBillNo + "'" //+ " Where SysID=1000"; Respond = ExicuteAnyCommand(Str1, "Save Config"); }