Example #1
0
        public static string FireEventBtn(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)
                {
                    if (bwfb.FireEventBtn(sid, sbt, Convert.ToInt32(bstate), bms, iv.u.ename) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #2
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);
        }
Example #3
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);
        }
Example #4
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);
        }