public static ArrayList QueryEmployeeByAttr(string attr) { ArrayList r = new ArrayList(); Sys_DepmentBll sdb = new Sys_DepmentBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r.Add(iv.badstr); List <Sys_Depment> ls = new List <Sys_Depment>(); if (iv.u.rcode == "xtgl") { ls = sdb.QueryList(" and dattr='" + attr + "' and disused='true' "); } else { ls = sdb.QueryList(" and dattr='" + attr + "' and disused='true' and dcode in ( select dcode from Sys_REmployeeAgent where eno='" + iv.u.eno + "')"); } if (ls != null) { foreach (Sys_Depment s in ls) { ArrayList al = new ArrayList(); al.Add(s.dcode); al.Add(s.dname); al.Add(s.disend); r.Add(al); } } } else { r.Add(iv.badstr); } return(r); }
public JsonResult ReSetMsCz(string icode) { string r = ""; JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (smcb.ReSetMsCz(icode)) { r = "S"; } else { r = "F"; } d.d = r; } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult DelGlassPeriod(string gqcode) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (sltb.Delete(gqcode)) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } d.d = r; return(Json(d)); }
public static string DelTax(string tcode) { string r = ""; Sys_Tax sd = new Sys_Tax(); Sys_TaxBll sdb = new Sys_TaxBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (sdb.Delete(" and tcode='" + tcode + "'")) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } return(r); }
public JsonResult QueryFixAllMoney(string sid) { JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { decimal amoney = 0; decimal dmoney = 0; B_FixMoney bfm = bfmb.Query(" and sid='" + sid + "'"); if (bfm != null) { amoney = bfm.amoney; dmoney = bfm.dmoney; } decimal pmoney = bfpb.QueryOrderMoney(" and sid='" + sid + "'"); d.d = (amoney + dmoney + pmoney).ToString(); } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult QueryCaveList() { JsonData d = new JsonData(); ArrayList r = new ArrayList(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r.Add(iv.badstr); string where = ""; if (iv.u.rcode == "xtgl") { } else { where = " and dcode='" + iv.u.dcode.Substring(0, 8) + "'"; } List <Sys_Cave> ls = scb.QueryList(where); if (ls != null) { foreach (Sys_Cave sw in ls) { ArrayList al = new ArrayList(); al.Add(sw.ccode); al.Add(sw.cname); r.Add(al); } } } else { r.Add(iv.badstr); } d.d = js.Serialize(r); return(Json(d)); }
public JsonResult DelDataTable(string id) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (sdtb.Delete(" and id=" + id + "")) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } d.d = r; return(Json(d)); }
public static string SetOptProduction(string ocode, string pcode, string ncode) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { StringBuilder where = new StringBuilder(); string[] narr = ncode.Split(';'); if (sob.SetOptProduction(ocode, pcode, narr) > 0) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } return(r); }
public static ArrayList QueryFyList(string curpage, string pagesize) { ArrayList r = new ArrayList(); Sys_UnitBll sub = new Sys_UnitBll(); List <Sys_Unit> lsu = new List <Sys_Unit>(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { string where = ""; r.Add(iv.badstr); if (iv.u.rcode != "xtgl") { where = " and dcode='" + iv.u.dcode.Substring(0, 8) + "'"; } int rcount = 0; int pcount = 0; lsu = sub.QueryList(Convert.ToInt32(curpage), Convert.ToInt32(pagesize), where, "id desc", ref rcount, ref pcount); if (lsu != null) { r.Add(pcount); foreach (Sys_Unit s in lsu) { ArrayList al = new ArrayList(); al.Add(s.ucode); al.Add(s.uname); r.Add(al); } } } else { r.Add(iv.badstr); } return(r); }
public JsonResult ReSetFixProduction(string fcode, string icode) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (sfpb.ReSetFixProduction(fcode, icode) > 0) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } d.d = r; return(Json(d)); }
public static string SetOrderZbRemark(string sid, string emcode, string bcode, string remark) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r = "F"; if (borb.SetZbRemark(sid, emcode, remark)) { r = "S"; } else { r = "F"; } bbeb.WriteBtnRecoder(sid, bcode, iv.u.ename); } else { r = iv.badstr; } return(r); }
public static string UpdateAppointment(string sid, string cv, string gv, string vv, string sv, string sdv) { string r = ""; B_AfterReModifyOrder b = new B_AfterReModifyOrder(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { b.sid = sid; if (cv == null || cv == "") { b.sdate = "2000-01-01"; } else { b.sdate = CommonBll.GetBdate(cv); } b.senddate = CommonBll.GetBdate(sdv); b.gofee = Convert.ToDecimal(gv); b.servfee = Convert.ToDecimal(vv); b.stext = sv; if (basob.SetAppointment(b)) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } return(r); }
public static ArrayList CustQueryListByAttr(string attr) { ArrayList r = new ArrayList(); Sys_DepmentBll sdb = new Sys_DepmentBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r.Add(iv.badstr); string where = ""; if (iv.u.rcode == "xtgl") { } else { where = " and dcode like '" + iv.u.dcode + "'"; } List <Sys_Depment> ls = sdb.QueryList(" and dattr='" + attr + "' and disused='true'" + where); if (ls != null) { foreach (Sys_Depment s in ls) { ArrayList al = new ArrayList(); al.Add(s.dcode); al.Add(s.dname); al.Add(s.disend); r.Add(al); } } } else { r.Add(iv.badstr); } return(r); }
public static ArrayList CustQueryAllList(string dcode) { ArrayList r = new ArrayList(); Sys_DepmentBll sdb = new Sys_DepmentBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { string where = ""; r.Add(iv.badstr); if (iv.u.rcode == "xtgl") { } else { where = " and substring(dcode,1,4)='" + iv.u.dcode.Substring(0, 4) + "'"; } List <Sys_Depment> ls = sdb.QueryList(" and dpcode='" + dcode + "'" + where); if (ls != null) { foreach (Sys_Depment s in ls) { ArrayList al = new ArrayList(); al.Add(s.dcode); al.Add(s.dname); al.Add(s.disend); r.Add(al); } } } else { r.Add(iv.badstr); } return(r); }
public JsonResult DelSmProduction(string tcblbcode) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (sspb.Delete(tcblbcode)) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } d.d = r; return(Json(d)); }
public static ArrayList QueryListUnit() { ArrayList r = new ArrayList(); Sys_UnitBll sub = new Sys_UnitBll(); List <Sys_Unit> lsr = new List <Sys_Unit>(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r.Add(iv.badstr); string where = ""; if (iv.u.rcode == "xtgl") { } else { where = " and dcode='" + iv.u.dcode.Substring(0, 8) + "'"; } lsr = sub.QueryList(where); if (lsr != null) { foreach (Sys_Unit s in lsr) { ArrayList al = new ArrayList(); al.Add(s.ucode); al.Add(s.uname); r.Add(al); } } } else { r.Add(iv.badstr); } return(r); }
public JsonResult SetRDsize(string icode, string sfcode) { string r = ""; JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (sltb.SetRDsize(icode, sfcode)) { r = "S"; } else { r = "F"; } d.d = r; } else { d.d = iv.badstr; } return(Json(d)); }
public static string QueryProductions(string icode) { string r = ""; Sys_InventoryCategoryBll sicb = new Sys_InventoryCategoryBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { string[] arr = icode.Split(';'); foreach (string s in arr) { Sys_InventoryCategory sic = sicb.Query(" and iccode='" + s + "'"); if (sic != null) { r = r + sic.icname + ";"; } } } else { r = iv.badstr; } return(r); }
public JsonResult DelProduceCate(string lcode) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (spcb.Delete(" and lcode='" + lcode + "'")) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } d.d = r; return(Json(d)); }
public static ArrayList QueryListInventory(string mcode) { ArrayList r = new ArrayList(); Sys_InventoryDetailBll sub = new Sys_InventoryDetailBll(); List <Sys_InventoryDetail> lsr = new List <Sys_InventoryDetail>(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r.Add(iv.badstr); lsr = sub.QueryList(" and iccode='" + mcode + "'"); if (lsr != null) { foreach (Sys_InventoryDetail s in lsr) { ArrayList al = new ArrayList(); al.Add(s.icode); al.Add(s.iname); al.Add(s.mname); al.Add(s.iunit); al.Add(s.isaleprice); al.Add(s.isupplyprice); al.Add(s.ipurchaseprice); al.Add(s.tcprice); al.Add(s.istate == true?"启用":"停用"); al.Add(s.psize); r.Add(al); } } } else { r.Add(iv.badstr); } return(r); }
public JsonResult InitDataTable(string id) { JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { Sys_DataTable sal = new Sys_DataTable(); if (id != "") { sal = sdtb.Query(" and id=" + id + ""); } else { sal.id = 0; } d.d = js.Serialize(sal); } else { d.d = iv.badstr; } return(Json(d)); }
public static string SetPrice(string cgp, string ghp, string pcodelist, string plx, string tcp, string xsp) { string r = ""; Sys_InventoryDetailBll sdb = new Sys_InventoryDetailBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { string [] clist = pcodelist.Split(';'); if (sdb.SetPrice(clist, plx, xsp, ghp, cgp, tcp) > 0) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } return(r); }
public static string ReSetTax(string dcode) { string r = ""; Sys_Tax sd = new Sys_Tax(); Sys_TaxBll sdb = new Sys_TaxBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (sdb.ReSetAgentTax(dcode) > 0) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } return(r); }
public static string SetState(string plcode, string t) { string r = ""; Sys_InventoryDetailBll sdb = new Sys_InventoryDetailBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { string[] clist = plcode.Split(';'); if (sdb.SetState(clist, t) > 0) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } return(r); }
public JsonResult DelMsCz(string czcode) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (smcb.Delete(czcode)) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } d.d = r; return(Json(d)); }
public JsonResult DelSendType(string scode) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (smotb.Delete(" and scode='" + scode + "'")) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } d.d = r; return(Json(d)); }
public JsonResult DelCAccount(string bcode) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (sab.Delete(" and bcode='" + bcode + "'")) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } d.d = r; return(Json(d)); }
public JsonResult InitSmProduction(string tccode, string tcblbcode) { JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { Sys_SetMealProduction sal = new Sys_SetMealProduction(); if (tcblbcode != "") { sal = sspb.Query(" and tcblbcode='" + tcblbcode + "'"); } else { Sys_SetMeal ssm = salb.Query(" and tccode='" + tccode + "'"); if (ssm != null) { sal.tccode = ssm.tccode; sal.tcname = ssm.tcname; } else { sal.tccode = ""; sal.tcname = ""; } sal.tcblbcode = sspb.CreateCode().ToString().PadLeft(4, '0'); sal.id = 0; } d.d = js.Serialize(sal); } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult SetMsYt(string mscode, string ycode) { JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { string r = ""; if (msb.SetMsYt(mscode, ycode)) { r = "S"; } else { r = "F"; } d.d = r; } else { d.d = iv.badstr; } return(Json(d)); }
public static string InitDepment(string pdepcode) { string r = ""; Sys_Depment psd = new Sys_Depment(); Sys_Depment sd = new Sys_Depment(); Sys_DepmentBll sdb = new Sys_DepmentBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { psd = sdb.Query(" and dcode='" + pdepcode + "'"); if (psd != null) { sd.dpname = psd.dname; sd.dpcode = psd.dcode; sd.dcode = pdepcode + sdb.CreateCode(psd.dcode).ToString().PadLeft(4, '0'); sd.dsort = sdb.CreateCode(psd.dcode); sd.id = 0; r = js.Serialize(sd); } else { sd.dpname = ""; sd.dpcode = ""; sd.dcode = sdb.CreateCode("").ToString().PadLeft(4, '0'); sd.dsort = sdb.CreateCode(""); sd.id = 0; r = js.Serialize(sd); } } else { r = iv.badstr; } return(r); }