Esempio n. 1
0
        public static string CustDelUnit(string ucode)
        {
            string              r   = "";
            Sys_UnitBll         sdb = new Sys_UnitBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                Sys_Unit su = sdb.Query("and ucode='" + ucode + "'");
                if (su != null)
                {
                    if (su.uread)
                    {
                        r = "R";
                    }
                    else
                    {
                        if (sdb.Delete(" and ucode='" + ucode + "'"))
                        {
                            r = "S";
                        }
                        else
                        {
                            r = "F";
                        }
                    }
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Esempio n. 2
0
        public static string DelUnit(string ucode)
        {
            string              r   = "";
            Sys_UnitBll         sdb = new Sys_UnitBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (sdb.Delete(" and ucode='" + ucode + "'"))
                {
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }