Exemplo n.º 1
0
        public static string InitProcessFlow(string pcode)
        {
            string              r    = "";
            Sys_ProcessFlow     sns  = new Sys_ProcessFlow();
            Sys_ProcessFlowBll  snsb = new Sys_ProcessFlowBll();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                Sys_ProcessFlow csns = snsb.Query(" and pcode='" + pcode + "'");
                if (csns != null)
                {
                    r = js.Serialize(csns);
                }
                else
                {
                    sns.pname = "";
                    sns.pcode = snsb.CreateCode().ToString().PadLeft(4, '0');
                    sns.id    = 0;
                    r         = js.Serialize(sns);
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Exemplo n.º 2
0
        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);
        }