Example #1
0
        public static ArrayList QueryListLButton(string emcode, string bt)
        {
            ArrayList           r   = new ArrayList();
            Sys_ButtonBll       sdb = new Sys_ButtonBll();
            List <Sys_Button>   lsb = new List <Sys_Button>();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                lsb = sdb.QueryList(" and emcode='" + emcode + "' and btype='" + bt + "'");
                if (lsb != null)
                {
                    foreach (Sys_Button s in lsb)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.bcode);
                        al.Add(s.emname);
                        al.Add(s.bname);
                        al.Add(s.bspeattr);
                        al.Add(s.bstyle);
                        al.Add(s.bshow == true?"是":"否");
                        al.Add(s.bremark);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Example #2
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);
        }
Example #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);
        }
Example #4
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);
        }
Example #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);
        }
Example #6
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);
        }
Example #7
0
        public static ArrayList QueryListWButton(string wcode)
        {
            ArrayList           r   = new ArrayList();
            Sys_ButtonBll       sdb = new Sys_ButtonBll();
            List <Sys_Button>   lsb = new List <Sys_Button>();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                lsb = sdb.QueryList(" and wcode='" + wcode + "'");
                if (lsb != null)
                {
                    foreach (Sys_Button s in lsb)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.bcode);
                        al.Add(s.wname);
                        al.Add(s.bname);
                        al.Add(s.battr);
                        al.Add(s.bshow);
                        al.Add(s.bstyle);
                        al.Add(s.bremark);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Example #8
0
        public static string GetRolePageItemBtn(string rcode, string emcode)
        {
            string              r   = "";
            Sys_ButtonBll       sdb = new Sys_ButtonBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r = sdb.GetRolePageItemBtn(rcode, emcode);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #9
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 #10
0
        public static string SetRolePageListBtn(string rcode, string emcode, string bcode)
        {
            string              r   = "";
            Sys_ButtonBll       sdb = new Sys_ButtonBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (bcode != "")
                {
                    string[] bcodearr = bcode.Split(';');
                    if (sdb.SetRoleEmenuBtn(rcode, emcode, bcodearr, "L") > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (sdb.SetRoleEmenuBtn(rcode, emcode, null, "L") > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #11
0
        public static string DelButton(string bcode)
        {
            string              r   = "";
            Sys_ButtonBll       sdb = new Sys_ButtonBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (sdb.Delete(bcode))
                {
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #12
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 #13
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);
        }
Example #14
0
        public static string SaveButton(
            string babc, string battr, string bcheck, string bcode, string bfunction, string bico, string bid, string bisstate,
            string bname, string brcode, string bremark, string bshow, string bsql, string bstate, string bstyle, string btip,
            string btsattr, string btype, string burl, string bwcode, string bwname, string emcode, string emname)
        {
            string              r   = "";
            Sys_ButtonBll       sbb = new Sys_ButtonBll();
            Sys_Button          sb  = new Sys_Button();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                sb.babc       = babc;
                sb.battr      = battr;
                sb.bcheck     = bcheck == "0" ? false : true;
                sb.bcode      = bcode;
                sb.bfn        = bfunction;
                sb.biszt      = bisstate == "0" ? false : true;
                sb.bname      = bname;
                sb.brcode     = brcode;
                sb.bshow      = bshow == "0" ? false : true;
                sb.bsql       = bsql;
                sb.bstate     = Convert.ToInt32(bstate);
                sb.bstyle     = bstyle;
                sb.btype      = btype;
                sb.bspeattr   = Convert.ToInt32(btsattr);
                sb.burl       = burl;
                sb.emname     = emname;
                sb.emcode     = emcode;
                sb.remcode    = "";
                sb.wname      = bwname;
                sb.wcode      = bwcode;
                sb.rwcode     = "";
                sb.brname     = "";
                sb.bsort      = 0;
                sb.bproname   = "";
                sb.bprocedure = "";
                sb.btip       = Convert.ToInt32(btip);
                sb.bremark    = bremark;
                sb.bico       = bico;
                if (bname == "返回")
                {
                    sb.bsort = 9999;
                }
                if (bname == "导出" || bname == "打印")
                {
                    sb.bsort = 9998;
                }
                if (bid == "0")
                {
                    if (sbb.Add(sb) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (sbb.Update(sb))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #15
0
        public static string SaveTButton(
            string tbabc, string tbattr, string tbcode, string tbfunction, string tbid, string tbimg,
            string tbname, string tbshow, string tbsql, string tbstyle, string tbszt,
            string tburl, string temcode, string temname, string trcode, string ttip)
        {
            string              r   = "";
            Sys_ButtonBll       sbb = new Sys_ButtonBll();
            Sys_Button          sb  = new Sys_Button();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                tbattr        = tbattr == "" ? "0" : tbattr;
                sb.babc       = tbabc;
                sb.battr      = "";
                sb.bcheck     = false;
                sb.bcode      = tbcode;
                sb.bfn        = tbfunction;
                sb.biszt      = tbszt == "0" ? false : true;
                sb.bname      = tbname;
                sb.brcode     = trcode;
                sb.bshow      = tbshow == "0" ? false : true;;
                sb.bsql       = tbsql;
                sb.bstate     = 0;
                sb.bstyle     = tbstyle;
                sb.btype      = "";
                sb.bspeattr   = Convert.ToInt32(tbattr);
                sb.burl       = tburl;
                sb.emname     = temname;
                sb.emcode     = temcode;
                sb.remcode    = "";
                sb.wname      = "";
                sb.wcode      = "";
                sb.rwcode     = "";
                sb.brname     = "";
                sb.bsort      = 0;
                sb.bproname   = "";
                sb.bprocedure = "";
                sb.btip       = Convert.ToInt32(ttip);
                sb.bico       = tbimg;
                if (tbname == "返回")
                {
                    sb.bsort = 9999;
                }
                if (tbname == "导出" || tbname == "打印")
                {
                    sb.bsort = 9998;
                }
                if (tbid == "0")
                {
                    if (sbb.Add(sb) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (sbb.Update(sb))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #16
0
        public static string SaveDButton(string dbabc, string dbcode, string dbform, string dbfunction,
                                         string dbid, string dbjdcode, string dbname, string dbrcode, string dbsql, string dbstate, string dbstyle,
                                         string dburl, string dico, string dmcode, string dmname)
        {
            string              r   = "";
            Sys_ButtonBll       sbb = new Sys_ButtonBll();
            Sys_Button          sb  = new Sys_Button();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                sb.babc       = dbabc;
                sb.bico       = dico;
                sb.battr      = "";
                sb.bcheck     = false;
                sb.bcode      = dbcode;
                sb.bfn        = dbfunction;
                sb.biszt      = false;
                sb.bname      = dbname;
                sb.brcode     = dbrcode;
                sb.bshow      = true;
                sb.bsql       = dbsql;
                sb.bstate     = Convert.ToInt32(dbstate);
                sb.bstyle     = dbstyle;
                sb.btype      = "D";
                sb.bspeattr   = 0;//Convert.ToInt32(tbattr);
                sb.burl       = dburl;
                sb.emname     = dmname;
                sb.emcode     = dmcode;
                sb.remcode    = dbform;
                sb.wname      = "";
                sb.wcode      = "";
                sb.rwcode     = dbjdcode;
                sb.brname     = "";
                sb.bsort      = 0;
                sb.bproname   = "";
                sb.bprocedure = "";
                sb.btip       = 0;
                if (sb.bname == "返回")
                {
                    sb.bsort = 9999;
                }
                if (sb.bname == "导出" || sb.bname == "打印")
                {
                    sb.bsort = 9998;
                }
                if (dbid == "0")
                {
                    if (sbb.Add(sb) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (sbb.Update(sb))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #17
0
        public static string SaveLButton(string lbico, string lmbabc, string lmbcode, string lmbfunction, string lmbname, string lmbsql, string lmbshow,
                                         string lmbstyle, string lmbtab, string lmburl, string lmename, string lmecode, string lmbid)
        {
            string              r   = "";
            Sys_ButtonBll       sbb = new Sys_ButtonBll();
            Sys_Button          sb  = new Sys_Button();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                sb.babc   = lmbabc;
                sb.battr  = "";
                sb.bcheck = false;
                sb.bcode  = lmbcode;
                sb.bfn    = lmbfunction;
                sb.biszt  = false;
                sb.bname  = lmbname;
                sb.brcode = "";
                sb.bico   = lbico;
                if (lmbshow == "1")
                {
                    sb.bshow = true;
                }
                else
                {
                    sb.bshow = false;
                }
                sb.bsql       = lmbsql;
                sb.bstate     = 0;
                sb.bstyle     = lmbstyle;
                sb.btype      = "L";
                sb.bspeattr   = 0;//Convert.ToInt32(tbattr);
                sb.burl       = lmburl;
                sb.emname     = lmename;
                sb.emcode     = lmecode;
                sb.wname      = "";
                sb.wcode      = "";
                sb.brname     = "";
                sb.bsort      = 0;
                sb.bproname   = "";
                sb.bprocedure = "";
                sb.btip       = 0;
                sb.btab       = lmbtab;
                if (lmbname == "返回")
                {
                    sb.bsort = 9999;
                }
                if (lmbname == "导出" || lmbname == "打印")
                {
                    sb.bsort = 9998;
                }
                if (lmbid == "0")
                {
                    if (sbb.Add(sb) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (sbb.Update(sb))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }