예제 #1
0
        public static string FireGeneralPageBtn(string sid, string bcode, string bms)
        {
            string              r    = "";
            Sys_ButtonBll       sbb  = new Sys_ButtonBll();
            BusiWorkFlowBll     bwfb = new BusiWorkFlowBll();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                Sys_Button sbt = sbb.Query(" and bcode='" + bcode + "'");
                if (sbt != null)
                {
                    if (bwfb.FireGeneralPageBtn(sid, sbt, bms, iv.u.ename) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
예제 #2
0
        public static string FireEventBtnAgr(string sid, string bcode, string bstate, string bms)
        {
            string              r    = "";
            Sys_ButtonBll       sbb  = new Sys_ButtonBll();
            BusiWorkFlowBll     bwfb = new BusiWorkFlowBll();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                Sys_Button sbt = sbb.Query(" and bcode='" + bcode + "'");
                if (sbt != null)
                {
                    r = bwfb.FireEventBtnArg(sid, sbt, Convert.ToInt32(bstate), bms, iv.u.ename);
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
예제 #3
0
        public static string InitLButton(string emcode, string bcode)
        {
            string              r    = "";
            Sys_EventMenuBll    semb = new Sys_EventMenuBll();
            Sys_EventMenu       sem  = new Sys_EventMenu();
            Sys_ButtonBll       sbb  = new Sys_ButtonBll();
            Sys_Button          sb   = new Sys_Button();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (bcode == "" || bcode == null)
                {
                    sem       = semb.Query(" and emcode='" + emcode + "'");
                    sb.id     = 0;
                    sb.bname  = "";
                    sb.bcode  = sbb.CreateCode().ToString().PadLeft(4, '0');
                    sb.emname = sem.emname == null ? "" : sem.emname;
                    sb.emcode = sem.emcode == null ? "" : sem.emcode;
                    sb.bshow  = true;
                }
                else
                {
                    sb = sbb.Query(" and bcode='" + bcode + "'");
                }
                r = js.Serialize(sb);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
예제 #4
0
        public static string InitBackEvent(string bcode, string ecode)
        {
            string              r    = "";
            Sys_BackEventBll    sbeb = new Sys_BackEventBll();
            Sys_BackEvent       sbe  = new Sys_BackEvent();
            Sys_ButtonBll       sbb  = new Sys_ButtonBll();
            Sys_Button          sb   = new Sys_Button();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (ecode == "" || ecode == null)
                {
                    sb        = sbb.Query(" and bcode='" + bcode + "'");
                    sbe.id    = 0;
                    sbe.ename = "";
                    sbe.ecode = sbeb.CreateCode().ToString().PadLeft(4, '0');
                    sbe.bname = sb.bname == null ? "" : sb.bname;
                    sbe.bcode = sb.bcode == null ? "" : sb.bcode;
                }
                else
                {
                    sbe = sbeb.Query(" and ecode='" + ecode + "'");
                }
                r = js.Serialize(sbe);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
예제 #5
0
        public static string InitWButton(string wcode, string bcode)
        {
            string              r    = "";
            Sys_WorkEventBll    sweb = new Sys_WorkEventBll();
            Sys_WorkEvent       swe  = new Sys_WorkEvent();
            Sys_ButtonBll       sbb  = new Sys_ButtonBll();
            Sys_Button          sb   = new Sys_Button();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (bcode == "" || bcode == null)
                {
                    swe      = sweb.Query(" and wcode='" + wcode + "'");
                    sb.id    = 0;
                    sb.bname = "";
                    sb.bcode = sbb.CreateCode().ToString().PadLeft(4, '0');
                    sb.wname = swe.wname == null ? "" : swe.wname;
                    sb.wcode = swe.wcode == null ? "" : swe.wcode;
                }
                else
                {
                    sb = sbb.Query(" and bcode='" + bcode + "'");
                }
                r = js.Serialize(sb);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
예제 #6
0
        public static ArrayList BatchFireEventBtn(string sid, string bcode, string bstate, string bms)
        {
            ArrayList           r    = new ArrayList();
            string              bstr = "";
            Sys_ButtonBll       sbb  = new Sys_ButtonBll();
            BusiWorkFlowBll     bwfb = new BusiWorkFlowBll();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                Sys_Button sbt = sbb.Query(" and bcode='" + bcode + "'");
                if (sbt != null)
                {
                    r.Add("S");
                    string[] sids = sid.Split(';');
                    if (sids.Length > 0)
                    {
                        foreach (string id in sids)
                        {
                            if (bwfb.FireEventBtn(id, sbt, Convert.ToInt32(bstate), bms, iv.u.ename) > 0)
                            {
                            }
                            else
                            {
                                bstr = bstr + id + ";";
                            }
                        }
                    }
                    if (bstr.Length > 1)
                    {
                        r.Add(bstr.Substring(0, bstr.Length - 1));
                    }
                }
                else
                {
                    r.Add("F");
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
예제 #7
0
        public static string MBatchFireEventBtn(string sid, string bms)
        {
            string              r    = "";
            Sys_ButtonBll       sbb  = new Sys_ButtonBll();
            BusiWorkFlowBll     bwfb = new BusiWorkFlowBll();
            CB_OrderFlowBll     cofb = new CB_OrderFlowBll();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                string[] sids = sid.Split(';');
                if (sids.Length > 0)
                {
                    foreach (string id in sids)
                    {
                        string     wcode = cofb.QueryCurWorkFlow(id);
                        Sys_Button sbt   = sbb.Query(" and wcode='" + wcode + "' and battr='T'");
                        try
                        {
                            if (bwfb.FireEventBtn(id, sbt, 1, bms, iv.u.ename) > 0)
                            {
                                r = "S";
                            }
                        }
                        catch
                        {
                            r = "F";
                        }
                    }
                }
            }
            else
            {
                r = iv.badstr;;
            }
            return(r);
        }
예제 #8
0
        public static string UnUserFireEventBtn(string sid, string bcode, string bstate, string bms)
        {
            string          r    = "";
            Sys_ButtonBll   sbb  = new Sys_ButtonBll();
            BusiWorkFlowBll bwfb = new BusiWorkFlowBll();
            Sys_Button      sbt  = sbb.Query(" and bcode='" + bcode + "'");

            if (sbt != null)
            {
                if (bwfb.FireEventBtn(sid, sbt, Convert.ToInt32(bstate), bms, "admin") > 0)
                {
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = "F";
            }
            return(r);
        }