///---------------------------CUST-------------------------- #region//保存产品模板类 public JsonResult CustSaveXqTemp(string xqcode, string xqdt, string xqid, string xqname, string xqtt) { JsonData d = new JsonData(); Sys_ProductionXqTemp sb = new Sys_ProductionXqTemp(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { sb.qtcode = xqcode; sb.qtname = xqname; sb.dcode = iv.u.dcode.Substring(0, 8); sb.qread = false; sb.qtype = "p"; sb.qtemp = xqdt; sb.qttemp = xqtt; sb.maker = iv.u.ename; sb.cdate = DateTime.Now.ToString(); if (xqid == "0") { if (sptcb.Add(sb) > 0) { d.d = "S"; } else { d.d = "F"; } } else { if (sptcb.Update(sb)) { d.d = "S"; } else { d.d = "F"; } } } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult GetProcessLine(string pcode) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r = sppb.GetProcessLine(pcode); } else { r = iv.badstr; } d.d = r; return(Json(d)); }
public JsonResult GetSizeLimitedCate(string icode) { string r = ""; JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r = sslb.GetSizeLimitedCate(icode); d.d = r; } else { d.d = iv.badstr; } return(Json(d)); }
protected void Page_Load(object sender, EventArgs e) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); B_MeasureImgBll bmib = new B_MeasureImgBll(); if (iv.f) { HttpFileCollection files = Request.Files; string csid = Request.QueryString["csid"]; string clname = Request.QueryString["clname"]; string newname = DateTime.Now.ToString("yyyyMMddhhmmssfff"); UpFile uf = new UpFile(); ArrayList efile = new ArrayList(); B_MeasureImg spi = new B_MeasureImg(); string url = "/UpFile/ImageMeasure/"; string ur = uf.UpImage(files[0], newname, url, 10240000); if (ur.Length > 1) { spi.csid = csid; spi.maker = iv.u.ename; spi.imgname = clname; spi.url = url + ur; spi.cdate = DateTime.Now.ToString(); if (bmib.Add(spi) > 0) { r = "S"; } else { r = "F"; } } else { r = ur; } } else { r = iv.badstr; } Response.Write("{ msg:'" + r + "'}"); Response.End(); }
public static string QueryOrder(string sid) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { B_CityPayOrder bpo = new B_CityPayOrder(); bpo = bcpob.Query(" and sid='" + sid + "'"); r = js.Serialize(bpo); } else { r = iv.badstr; } return(r); }
public JsonResult GetXqTemp(string pcode, string emcode) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r = sptcb.GetXqTemp(pcode, emcode); } else { r = iv.badstr; } d.d = r; return(Json(d)); }
public static string SaveWjBom(string bcode, string bid, string bname, string bnum, string bprice, string bunit, string ebcode, string icode) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { Sys_WjBom sr = new Sys_WjBom(); sr.bcode = bcode; sr.bname = bname; sr.becode = ebcode; sr.bnum = Convert.ToDecimal(bnum); sr.bprice = Convert.ToDecimal(bprice); sr.cdate = DateTime.Now.ToString(); sr.bunit = bunit; sr.icode = icode; if (bid == "0") { if (swbb.Add(sr) > 0) { r = "S"; } else { r = "F"; } } else { if (swbb.Update(sr)) { r = "S"; } else { r = "F"; } } } else { r = iv.badstr; } return(r); }
public static ArrayList QueryListInventoryCategoryRange(string ipcode, string drange) { ArrayList r = new ArrayList(); Sys_InventoryCategoryBll sub = new Sys_InventoryCategoryBll(); List <Sys_InventoryCategory> lsr = new List <Sys_InventoryCategory>(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r.Add(iv.badstr); string where = ""; if (iv.u.rcode == "xtgl") { where = " and icpcode='" + ipcode + "' and drange='" + drange + "' order by isort"; } else { if (ipcode == "") { where = " and icpcode='" + iv.u.dcode.Substring(0, 8) + "' and drange='" + drange + "' order by isort"; } else { where = " and icpcode='" + ipcode + "' and drange='" + drange + "' order by isort"; } } lsr = sub.QueryList(where); if (lsr != null) { foreach (Sys_InventoryCategory s in lsr) { ArrayList al = new ArrayList(); al.Add(s.iccode); al.Add(s.icname); al.Add(s.icstate); r.Add(al); } } } else { r.Add(iv.badstr); } return(r); }
public static string CustSaveUnit(string ucode, string uname, string uid) { string r = ""; Sys_UnitBll sub = new Sys_UnitBll(); Sys_Unit su = new Sys_Unit(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { su.ucode = ucode; su.uname = uname; su.cdate = DateTime.Now.ToString(); su.maker = iv.u.ename; su.uread = false; su.utype = "p"; su.dcode = iv.u.dcode.Substring(0, 8); if (uid == "0") { if (sub.Add(su) > 0) { r = "S"; } else { r = "F"; } } else { if (sub.Update(su)) { r = "S"; } else { r = "F"; } } } else { r = iv.badstr; } return(r); }
public static string CustSaveOverConditionCate(string lcode, string lid, string lname, string ltype, string lunit) { string r = ""; Sys_OverComputeCategoryBll snsb = new Sys_OverComputeCategoryBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { Sys_OverComputeCategory s = new Sys_OverComputeCategory(); s.oname = lname; s.ocode = lcode; s.otype = ltype; s.ounit = lunit; s.cdate = DateTime.Now.ToString(); s.maker = iv.u.ename; s.dcode = iv.u.dcode.Substring(0, 8); if (lid == "0") { if (snsb.Add(s) > 0) { r = "S"; } else { r = "F"; } } else { if (snsb.Update(s)) { r = "S"; } else { r = "F"; } } } else { r = iv.badstr; } return(r); }
public static string MzSavePayOperator(string bcode,string bjr, string bz, string dxjine, string settlement, string shoukuan, string sid, string skdate, string skr, string weishou) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { B_PayRecord bpr = new B_PayRecord(); bpr.pmoney = Convert.ToDecimal(shoukuan); bpr.pmoneystr = dxjine; bpr.sname = settlement; bpr.sid = sid; bpr.ps = bz; bpr.maker = skr; bpr.pdate = skdate; bpr.ptype = "dj"; bpr.cdate = DateTime.Now.ToString(); B_PayRecord cb = bprb.Query(" and sid='" + sid + "'"); CB_OrderState bos = cbsb.Query(" and sid='" + sid + "' and imoney>0"); if (bos == null) { BaseSet.WorkFlowManage.EventBtnDo.FireEventBtn(sid, bcode, "1", "收款"); } if (Convert.ToDecimal(shoukuan) == Convert.ToDecimal(weishou)) { cbsb.UpState(sid, "imoney", 2); } else { cbsb.UpState(sid, "imoney", 1); } if (bprb.Add(bpr) > 0) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } return r; }
public JsonResult CheckTip(string icode, string hv, string wv, string dv) { JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { string r = "S"; string scode = sslb.GetSizeLimitedCate(icode.Substring(0, icode.Length - 3)); if (scode != "") { Sys_SizeLimited lss = sslb.Query(" and lcode='" + scode + "'"); if (lss != null) { if (lss.hmax > 0) { if (Convert.ToInt32(hv) > lss.hmax || Convert.ToInt32(hv) < lss.hmin) { r = lss.ttip; } } if (lss.kmax > 0) { if (Convert.ToInt32(wv) > lss.kmax || Convert.ToInt32(wv) < lss.kmin) { r = lss.ttip; } } if (lss.dmax > 0) { if (Convert.ToInt32(dv) > lss.dmax || Convert.ToInt32(dv) < lss.dmin) { r = lss.ttip; } } } } d.d = r; } else { d.d = iv.badstr; } return(Json(d)); }
public static string AfterImgShow(string sid) { string rr = ""; StringBuilder r = new StringBuilder(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { List <B_FeedBackImg> lb = new List <B_FeedBackImg>(); lb = bfbib.QueryList(" and sid='" + sid + "'"); if (lb != null) { r.Append("<table style='width:100%'>"); r.Append("<tr style='background:#f2f2f2; height:30px'>"); r.Append("<td style='background:#f2f2f2; height:30px; width:10%' align='center'><span style='font-size:16px; font-weight:bolder;color:#666666'>名称</span></td>"); r.Append("<td style='background:#f2f2f2; height:30px' align='center'><span style='font-size:16px; font-weight:bolder;color:#666666'>详情</span></td>"); r.Append("</tr>"); foreach (B_FeedBackImg b in lb) { r.Append("<tr>"); r.Append("<td style=' height:25px' align='center'><span style='font-size:14px; font-weight:bolder;color:#666666'>名称</span></td>"); r.Append("<td align='left'>" + b.iname + "</td>"); r.Append("<tr>"); r.Append("<tr>"); r.Append("<td style=' height:25px 'align='center'><span style='font-size:14px; font-weight:bolder;color:#666666'>说明</span></td>"); r.Append("<td align='left'>" + b.remark + "</td>"); r.Append("<tr>"); r.Append("<tr>"); r.Append("<td style=' height:25px' align='center'><span style='font-size:14px; font-weight:bolder;color:#666666'>图片</span></td>"); r.Append("<td><img id='F" + b.id + "' src='" + b.url + "' onclick='nck(this.id)'/></td>"); r.Append("</tr>"); r.Append("<tr>"); r.Append("<td style=' background:#f2f2f2;height:5px' colspan='2'> </td>"); r.Append("<tr>"); } r.Append("</table>"); } rr = r.ToString(); } else { rr = iv.badstr; } return(rr); }
public JsonResult SaveSizeR(string rjcode, string rjid, string rjlenth, string rjname, string rjtype, string rjwidth) { JsonData d = new JsonData(); Sys_SizeTransformR sb = new Sys_SizeTransformR(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { sb.cdate = DateTime.Now.ToString(); sb.dcode = iv.u.dcode.Substring(0, 8); sb.dh = Convert.ToInt32(rjlenth); sb.dw = Convert.ToInt32(rjwidth); sb.maker = iv.u.ename; sb.rcode = rjcode; sb.rname = rjname; sb.rtype = rjtype; if (rjid == "0") { if (sstfb.Add(sb) > 0) { d.d = "S"; } else { d.d = "F"; } } else { if (sstfb.Update(sb)) { d.d = "S"; } else { d.d = "F"; } } } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult SaveTabMenu(string isflow, string pid, string pcode, string pname) { JsonData d = new JsonData(); Sys_TabMenu sa = new Sys_TabMenu(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { sa.tmcode = pcode; sa.tmname = pname; sa.maker = iv.u.ename; sa.cdate = DateTime.Now.ToString(); sa.dcode = ""; sa.tread = true; sa.isflow = isflow == "1" ? true : false; if (pid == "0") { if (stmb.Add(sa) > 0) { d.d = "S"; } else { d.d = "F"; } } else { sa.id = Convert.ToInt32(pid); if (stmb.Update(sa)) { d.d = "S"; } else { d.d = "F"; } } } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult SaveBl(string id, string pcbbl, string ppbl, string ppbz, string ppcode, string ppname, string pqtbl) { JsonData d = new JsonData(); Sys_PriceProportion spp = new Sys_PriceProportion(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { spp.ppname = ppname; spp.ppcode = ppcode; spp.ppbl = Convert.ToDecimal(ppbl); spp.pcbbl = Convert.ToDecimal(pcbbl); spp.pqtbl = Convert.ToDecimal(pqtbl); spp.pbz = ppbz; spp.maker = iv.u.ename; spp.cdate = DateTime.Now.ToString(); if (id == "0") { if (sppb.Add(spp) > 0) { d.d = "S"; } else { d.d = "F"; } } else { if (sppb.Update(spp)) { d.d = "S"; } else { d.d = "F"; } } } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult SaveWorkLine(string cattr, string ccode, string cid, string clv, string cname, string cpcode, string cpname, string ctype, string ctv) { JsonData d = new JsonData(); Sys_WorkLine swlc = new Sys_WorkLine(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { swlc.wccode = cpcode; swlc.wcname = cpname; swlc.wcode = ccode; swlc.wname = cname; swlc.wrattr = cattr; swlc.wrlv = Convert.ToInt32(clv); swlc.wrtv = Convert.ToInt32(ctv); swlc.wrtype = ctype; if (cid == "0") { if (swlb.Add(swlc) > 0) { d.d = "S"; } else { d.d = "F"; } } else { if (swlb.Update(swlc)) { d.d = "S"; } else { d.d = "F"; } } } else { d.d = iv.badstr; } return(Json(d)); }
public static string SaveDesigner(string eno, string id, string sappraise, string sintroduce, string sname, string sqq, string stelephone) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { Sys_Designer sd = new Sys_Designer(); sd.eno = eno; sd.dappraise = sappraise; sd.dintroduce = sintroduce; sd.dname = sname; sd.dqq = sqq; sd.dtelephone = stelephone; sd.cdate = DateTime.Now.ToString(); sd.maker = iv.u.ename; if (!sdb.Exists(" and eno='" + eno + "'")) { if (sdb.Add(sd) > 0) { r = "S"; } else { r = "F"; } } else { if (sdb.Update(sd)) { r = "S"; } else { r = "F"; } } } else { r = iv.badstr; } return(r); }
public static ArrayList QueryCdyList(string rcode) { ArrayList r = new ArrayList(); Sys_EmployeeBll seb = new Sys_EmployeeBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r.Add(iv.badstr); StringBuilder where = new StringBuilder(); string[] rarr = rcode.Split(','); if (rarr.Length > 0) { int k = 1; foreach (string s in rarr) { if (k == 1) { where.AppendFormat(" rcode='{0}'", s); } else { where.AppendFormat(" or rcode='{0}'", s); } k++; } } List <Sys_Employee> lse = seb.QueryList(" and dcode='" + iv.u.dcode + "' and (" + where.ToString() + ")"); if (lse != null) { foreach (Sys_Employee se in lse) { ArrayList al = new ArrayList(); al.Add(se.eno); al.Add(se.ename); r.Add(al); } } } else { r.Add(iv.badstr); } return(r); }
public JsonResult SaveRsize(string id, string rcode, string rg, string rh, string rk, string rname, string rtype) { JsonData d = new JsonData(); Sys_RefSizeTransform sa = new Sys_RefSizeTransform(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { sa.rjcode = rcode; sa.rjname = rname; sa.rtype = rtype; sa.rheight = Convert.ToInt32(rg); sa.rwidth = Convert.ToInt32(rk); sa.rdeep = Convert.ToInt32(rh); sa.maker = iv.u.ename; sa.cdate = DateTime.Now.ToString(); if (id == "0") { if (srstb.Add(sa) > 0) { d.d = "S"; } else { d.d = "F"; } } else { if (srstb.Update(sa)) { d.d = "S"; } else { d.d = "F"; } } } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult SavePriceTempCate(string ptlcode, string ptlid, string ptlms, string ptlname) { JsonData d = new JsonData(); Sys_ProductionPriceTempCate sb = new Sys_ProductionPriceTempCate(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { sb.ppicode = ptlcode; sb.ppiname = ptlname; sb.ppms = ptlms; sb.pread = true; sb.ptype = "a"; sb.dcode = ""; sb.maker = iv.u.ename; sb.cdate = DateTime.Now.ToString(); if (ptlid == "0") { if (sptcb.Add(sb) > 0) { d.d = "S"; } else { d.d = "F"; } } else { if (sptcb.Update(sb)) { d.d = "S"; } else { d.d = "F"; } } } else { d.d = iv.badstr; } return(Json(d)); }
public static string SaveLongTime(string id, string ldate, string remark) { string r = ""; BusiWorkFlowBll snsb = new BusiWorkFlowBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { CB_ProcessRecord cpr = new CB_ProcessRecord(); CB_OrderProduceProcess p = coppb.Query(" and id=" + id + ""); DateTime d1 = Convert.ToDateTime(ldate); DateTime d2 = Convert.ToDateTime(CommonBll.GetBdate(p.ydate)); TimeSpan ts = d1 - d2; int d = ts.Days; cpr.cdate = DateTime.Now.ToString(); cpr.jdname = p.jdname; cpr.jid = p.id; cpr.maker = iv.u.ename; cpr.rtext = p.jdname + "预计完成日期" + p.ydate + "延期到" + ldate + ";延期说明:" + remark; cpr.sid = p.sid; cprb.Add(cpr); List <CB_OrderProduceProcess> plist = coppb.QueryList(" and id>=" + p.id + " and sid='" + p.sid + "'"); if (plist != null) { foreach (CB_OrderProduceProcess cp in plist) { cp.ydate = Convert.ToDateTime(cp.ydate).AddDays(d).ToString(); coppb.SetLongTime(cp); } } if (coppb.UpState(id, -1)) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } return(r); }
public static ArrayList QueryListInventory(string mcode, string plb, string plx) { ArrayList r = new ArrayList(); Sys_InventoryDetailBll sub = new Sys_InventoryDetailBll(); Sys_PriceTypeBll srb = new Sys_PriceTypeBll(); 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(); decimal[] dprice = new decimal[3]; dprice = srb.GetPrice(plb, s.icode, plx); al.Add(s.icode); al.Add(s.iname); al.Add(s.mname); al.Add(s.iunit); if (dprice != null) { al.Add(dprice[0]); al.Add(dprice[1]); al.Add(dprice[2]); } else { al.Add(0); al.Add(0); al.Add(0); } r.Add(al); } } } else { r.Add(iv.badstr); } return(r); }
public static ArrayList QuerySapOrderList(string curpage, string emcode, string pagesize, string tabcode) { ArrayList r = new ArrayList(); DataTable lsr = new DataTable(); StringBuilder where = new StringBuilder(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r.Add(iv.badstr); int rcount = 0; int pcount = 0; Sys_ViewTable svt = svtb.QuerySelCols(emcode, tabcode, iv.u.rcode); if (svt == null) { } else { where.Append(CommonBll.SqlWhereReplace(iv.u, svt.sqlcondition)); string sfield = svt.sqlcols; lsr = bsob.QueryList(Convert.ToInt32(curpage), Convert.ToInt32(pagesize), sfield, where.ToString(), "id desc", ref rcount, ref pcount); if (lsr != null) { r.Add(pcount); foreach (DataRow dr in lsr.Rows) { ArrayList al = new ArrayList(); al.Add(bebb.QueryBtnListItems(emcode, iv.u.rcode, "LX", dr[1].ToString())); foreach (DataColumn column in lsr.Columns) { al.Add(dr[column].ToString()); } r.Add(al); } } } } else { r.Add(iv.badstr); } return(r); }
public JsonResult SaveCAccount(string abank, string acode, string aname, string aperson, string id, string remark, string subbank) { JsonData d = new JsonData(); Sbk_CollectionAccount sa = new Sbk_CollectionAccount(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { sa.aname = aname; sa.abank = abank; sa.aperson = aperson; sa.acode = acode; sa.asubbank = subbank; sa.remark = remark; sa.maker = iv.u.ename; sa.cdate = DateTime.Now.ToString(); if (id == "0") { if (sab.Add(sa) > 0) { d.d = "S"; } else { d.d = "F"; } } else { if (sab.Update(sa)) { d.d = "S"; } else { d.d = "F"; } } } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult GetGlassDire(string pcode) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { string sv = sgdb.GetGlassDire(pcode); r = sv; } else { r = iv.badstr; } d.d = r; return(Json(d)); }
public JsonResult QueryCommonSizeCollection(string bjcode) { ArrayList r = new ArrayList(); JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r.Add(iv.badstr); Sys_SizeFormatPart lsf = ssfpb.Query(" and bjcode='" + bjcode + "'"); d.d = js.Serialize(lsf); } else { d.d = iv.badstr; } return(Json(d)); }
public static string QueryProceeLine(string sid) { string r = ""; BusiWorkFlowBll snsb = new BusiWorkFlowBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { r = bppb.GetProduceOrder(sid); r = r + bppb.GetOrderProcess(sid); r = r + bppb.GetProduceProcess(sid); } else { r = iv.badstr; } return(r); }
public JsonResult GetMsColor(string mscode) { JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { if (mscode != "") { d.d = msb.GetMsColor(mscode); } } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult GetRjc(string mcode, string tcode, string cname) { JsonData d = new JsonData(); string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { Sys_Cave s = scb.Query(" and ccode='" + cname + "'"); r = sstfb.GetRjc(mcode, tcode, s.cname); } else { r = iv.badstr; } d.d = r; return(Json(d)); }