Ejemplo n.º 1
0
        public static string GetRefInv(string invcode, string mname)
        {
            string                 r     = "";
            string                 rcode = "";
            Sys_AssortBll          srb   = new Sys_AssortBll();
            Sys_InventoryDetailBll sidb  = new Sys_InventoryDetailBll();
            SessionUserValidate    iv    = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                rcode = srb.GetAssort(invcode.Substring(0, invcode.Length - 3));
                if (rcode != "")
                {
                    string[]            rv  = rcode.Split(';');
                    Sys_InventoryDetail si  = new Sys_InventoryDetail();
                    Sys_InventoryDetail sid = sidb.Query(" and  icode like '" + rv[0] + "%' and mname='" + mname + "'");
                    if (sid == null)
                    {
                        si.icname = "";
                        si.iccode = "";
                    }
                    else
                    {
                        si = sid;
                    }
                    r = js.Serialize(si);
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Ejemplo n.º 2
0
        public static string GetAssort(string pcode)
        {
            string                   r    = "";
            Sys_AssortBll            srb  = new Sys_AssortBll();
            Sys_InventoryCategoryBll sicb = new Sys_InventoryCategoryBll();
            SessionUserValidate      iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r = srb.GetAssort(pcode);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }