public static string InitProcessJd(string pcode, string jcode) { string r = ""; Sys_ProcessFlow sns = new Sys_ProcessFlow(); Sys_ProcessFlowBll snsb = new Sys_ProcessFlowBll(); Sys_ProcessPoint spp = new Sys_ProcessPoint(); Sys_ProcessPointBll sppb = new Sys_ProcessPointBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { Sys_ProcessPoint csns = sppb.Query(" and jcode='" + jcode + "'"); if (csns != null) { r = js.Serialize(csns); } else { spp.pname = snsb.Query(" and pcode='" + pcode + "'").pname; spp.pcode = pcode; spp.jname = ""; spp.jcode = sppb.CreateCode().ToString().PadLeft(4, '0'); spp.id = 0; r = js.Serialize(spp); } } else { r = iv.badstr; } return(r); }
public static string SaveProcessJd(string jdcode, string jdid, string jdlxcode, string jdlxname, string jdname, string jdtype, string jdzq, string qjdname) { string r = ""; Sys_ProcessPointBll sppb = new Sys_ProcessPointBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { Sys_ProcessPoint s = new Sys_ProcessPoint(); s.pname = jdlxname; s.pcode = jdlxcode; s.jtype = jdtype; s.jname = jdname; s.jcode = jdcode; s.precode = qjdname; s.usetime = Convert.ToDecimal(jdzq); s.maker = iv.u.ename; s.cdate = DateTime.Now.ToString(); if (jdid == "0") { if (sppb.Add(s) > 0) { r = "S"; } else { r = "F"; } } else { if (sppb.Update(s)) { r = "S"; } else { r = "F"; } } } else { r = iv.badstr; } return(r); }