public static string savedata(string nid, string taxCompanyID, string actionId, string aDate, string actionDetail, string comments, string actionByID, string recDate, string createdby, string remark) { string result = ""; clsTax objtax = new clsTax(); GeneralMethod objgen = new GeneralMethod(); try { string[] actionId1 = actionId.Split('#'); string[] aDate1 = aDate.Split('#'); string[] actionDetail1 = actionDetail.Split('#'); string[] comments1 = comments.Split('#'); string[] actionByID1 = actionByID.Split('#'); string[] recDate1 = recDate.Split('#'); objtax.action = "insert"; for (int i = 0; i < actionId1.Length; i++) { if (actionId1[i] != "") { if (i == 0) { objtax.nid = nid; } else { objtax.nid = ""; } objtax.taxCompanyID = taxCompanyID; objtax.actionId = actionId1[i]; objtax.aDate = aDate1[i]; objtax.actionDetail = actionDetail1[i]; objtax.comments = comments1[i]; if (actionByID1[i] == "") { objtax.actionByID = createdby; } else { objtax.actionByID = actionByID1[i]; } objtax.recDate = recDate1[i]; objtax.userid = createdby; objtax.remark = remark; objtax.Tax_Tax_Log(); } } } catch (Exception ex) { result = ex.ToString(); } return(result); }
public static string importtaxclient(string path, string cols, string val, string companyid) { path = HttpContext.Current.Server.MapPath("webfile/temp/" + path); DataAccess objda = new DataAccess(); clsTax objtax = new clsTax(); DataSet ds = new DataSet(); GeneralMethod objgen = new GeneralMethod(); ImportExcel objimport = new ImportExcel(); string[] cols1 = cols.Split('#'); string[] val1 = val.Split('#'); DataTable dt = new DataTable(); DataTable dtcol = new DataTable(); dtcol.Columns.Add(new DataColumn("conval")); dtcol.Columns.Add(new DataColumn("colname")); for (int i = 0; i < cols1.Length; i++) { if (cols1[i] != "") { DataRow ro = dtcol.NewRow(); ro["colname"] = cols1[i]; char c = Convert.ToChar(val1[i]); ro["conval"] = char.ToUpper(c) - 64; dtcol.Rows.Add(ro); } } objda.action = "5"; ds = objda.getImportCol(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { dt.Columns.Add(new DataColumn(ds.Tables[0].Rows[i]["colname"].ToString())); } } string result = objimport.selectFromExcel(path, dt, dtcol); if (result == "-1") { return(result); } else { objtax.companyId = companyid; ds = objtax.Tax_ImportClient_new(dt); result = objgen.serilizeinJson(ds.Tables[0]); return(result); } }
public static string deletelog(string id) { string result = ""; clsTax objtax = new clsTax(); DataSet ds1 = new DataSet(); objtax.action = "delete"; objtax.nid = id; ds1 = objtax.Tax_Tax_Log(); result = ""; return(result); }
public static string gettaxlogbynid(string id) { clsTax objtax = new clsTax(); DataSet ds1 = new DataSet(); GeneralMethod objgen = new GeneralMethod(); objtax.action = "select"; objtax.nid = id; ds1 = objtax.Tax_Tax_Log(); string result = objgen.serilizeinJson(ds1.Tables[0]); return(result); }
public static string getTaxClientbyNid(string id, string taxyear) { clsTax objtax = new clsTax(); DataSet ds1 = new DataSet(); GeneralMethod objgen = new GeneralMethod(); objtax.action = "select"; objtax.nid = id; objtax.taxYear = taxyear; ds1 = objtax.Tax_Tax_Client(); string result = objgen.serilizeinJson(ds1.Tables[0]); return(result); }
public static string gettaxlog(string taxcompanyid, string companyid) { clsTax objtax = new clsTax(); DataSet ds1 = new DataSet(); GeneralMethod objgen = new GeneralMethod(); objtax.action = "select"; objtax.companyId = companyid; objtax.nid = ""; objtax.taxCompanyID = taxcompanyid; ds1 = objtax.Tax_Tax_Log(); string result = objgen.serilizeinJson(ds1.Tables[0]); return(result); }
public static string getdata(string taxcompany, string taxyear, string companyid, string rectype) { clsTax objts = new clsTax(); DataSet ds1 = new DataSet(); GeneralMethod objgen = new GeneralMethod(); objts.companyId = companyid; objts.nid = taxcompany; objts.taxYear = taxyear; objts.typeid = rectype; ds1 = objts.Tax_Log_Report(); string result = objgen.serilizeinJson(ds1.Tables[0]); return(result); }
public static string getTaxClientbyTaxYear(string nid, string taxyear, string companyid) { clsTax objtax = new clsTax(); DataSet ds1 = new DataSet(); GeneralMethod objgen = new GeneralMethod(); objtax.action = "getbytaxyear"; objtax.nid = nid; objtax.companyId = companyid; objtax.taxYear = taxyear; objtax.name = ""; ds1 = objtax.Tax_Tax_Client(); string result = objgen.serilizeinJson(ds1.Tables[0]); return(result); }
public static string savedata(string nid, string name, string address, string city, string state, string zip, string phone, string email, string typeid, string taxtypeID, string taxFormID, string taxYear, string yearEndDate, string dueDate, string prevaig, string prevTotalTax, string taxpaid, string lastYRRefund, string companyId) { string result = ""; clsTax objtax = new clsTax(); GeneralMethod objgen = new GeneralMethod(); DataSet ds = new DataSet(); try { objtax.action = "insert"; objtax.nid = nid; objtax.name = name; objtax.address = address; objtax.city = city; objtax.state = state; objtax.zip = zip; objtax.phone = phone; objtax.email = email; objtax.typeid = typeid; objtax.taxtypeID = taxtypeID; objtax.taxYear = taxYear; objtax.taxFormID = taxFormID; objtax.yearEndDate = yearEndDate; objtax.dueDate = dueDate; objtax.prevaig = prevaig; objtax.prevTotalTax = prevTotalTax; objtax.taxpaid = taxpaid; objtax.lastYRRefund = lastYRRefund; objtax.companyId = companyId; ds = objtax.Tax_Tax_Client(); result = objgen.serilizeinJson(ds.Tables[0]); } catch (Exception ex) { result = result = @"[{""result"":""0"",""msg"":""Error, Please try again""}]"; } return(result); }