Exemple #1
0
        public JsonResult GetJst(string icode)
        {
            ArrayList           r  = new ArrayList();
            JsonData            d  = new JsonData();
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                string msc = icode.Substring(0, icode.Length - 3);
                List <Sys_InventoryDetail> lsd = sidb.QueryList(" and icode in (select jscode from Sys_RMsJst where  mscode='" + msc + "')");
                if (lsd != null)
                {
                    foreach (Sys_InventoryDetail sd in lsd)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(sd.icode);
                        al.Add(sd.iname);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            d.d = js.Serialize(r);
            return(Json(d));
        }
Exemple #2
0
        public static ArrayList QuerySearingList(string icode, string mname, string pname)
        {
            ArrayList r = new ArrayList();
            Sys_InventoryDetailBll     sub = new Sys_InventoryDetailBll();
            List <Sys_InventoryDetail> lsr = new List <Sys_InventoryDetail>();
            SessionUserValidate        iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                lsr = sub.QueryList(15, " and istate='true' and iccode like '" + icode + "%' and mname='" + mname + "' and iname like '%" + pname + "%'");
                if (lsr != null)
                {
                    foreach (Sys_InventoryDetail s in lsr)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.icode);
                        al.Add(s.iname);
                        al.Add(s.mname);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Exemple #3
0
        public static ArrayList QueryListItem()
        {
            ArrayList r = new ArrayList();
            Sys_InventoryDetailBll     sub = new Sys_InventoryDetailBll();
            List <Sys_InventoryDetail> lsr = new List <Sys_InventoryDetail>();
            SessionUserValidate        iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                lsr = sub.QueryList(" and istate='true'");
                if (lsr != null)
                {
                    foreach (Sys_InventoryDetail s in lsr)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.icode);
                        al.Add(s.iname);
                        al.Add(s.mname);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Exemple #4
0
        public static ArrayList QueryListCateProduce(string mcode)
        {
            ArrayList r = new ArrayList();
            Sys_InventoryDetailBll     sub = new Sys_InventoryDetailBll();
            List <Sys_InventoryDetail> lsr = new List <Sys_InventoryDetail>();
            SessionUserValidate        iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                lsr = sub.QueryList(" and iccode like'" + mcode + "%'");
                if (lsr != null)
                {
                    foreach (Sys_InventoryDetail s in lsr)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(s.icode);
                        al.Add(s.iname);
                        al.Add(s.mname);
                        al.Add(s.iunit);
                        al.Add(s.isaleprice);
                        al.Add(s.isupplyprice);
                        al.Add(s.ipurchaseprice);
                        al.Add(s.tcprice);
                        al.Add(s.istate == true ? "启用" : "停用");
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
Exemple #5
0
        public JsonResult QuerySmProdution(string tccode, string ptype, string ismt)
        {
            JsonData            d  = new JsonData();
            ArrayList           r  = new ArrayList();
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                List <Sys_InventoryDetail> lp = new List <Sys_InventoryDetail> ();
                r.Add(iv.badstr);
                if (ptype == "10")
                {
                    if (ismt == "1")
                    {
                        lp = sidb.QueryList(" and icode in ( select pcode from Sys_RInventorySetMeal where tcpcode in (select tcblbcode from Sys_SetMealProduction where tccode='" + tccode + "' ) and substring (pcode,1,2)='02' ) and istate=1");
                    }
                    else
                    {
                        lp = sidb.QueryList("and icode in ( select pcode from Sys_RInventorySetMeal where tcpcode in (select tcblbcode from Sys_SetMealProduction where tccode='" + tccode + "' )  and substring (pcode,1,2)='01' )  and istate=1");
                    }
                }
                else
                {
                    lp = sidb.QueryList("and icode in ( select pcode from Sys_RInventorySetMeal where tcpcode in (select tcblbcode from Sys_SetMealProduction where tccode='" + tccode + "' )  and substring (pcode,1,2)='" + ptype + "' )  and istate=1");
                }
                if (lp != null)
                {
                    foreach (Sys_InventoryDetail id in lp)
                    {
                        ArrayList al = new ArrayList();
                        al.Add(id.iname);
                        al.Add(id.icode);
                        al.Add(id.mname);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            d.d = js.Serialize(r);
            return(Json(d));
        }
Exemple #6
0
        public static ArrayList QueryListInventory(string mcode, string plb, string plx)
        {
            ArrayList r = new ArrayList();
            Sys_InventoryDetailBll     sub = new Sys_InventoryDetailBll();
            Sys_PriceTypeBll           srb = new Sys_PriceTypeBll();
            List <Sys_InventoryDetail> lsr = new List <Sys_InventoryDetail>();
            SessionUserValidate        iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                lsr = sub.QueryList(" and iccode='" + mcode + "'  ");
                if (lsr != null)
                {
                    foreach (Sys_InventoryDetail s in lsr)
                    {
                        ArrayList al     = new ArrayList();
                        decimal[] dprice = new decimal[3];
                        dprice = srb.GetPrice(plb, s.icode, plx);
                        al.Add(s.icode);
                        al.Add(s.iname);
                        al.Add(s.mname);
                        al.Add(s.iunit);
                        if (dprice != null)
                        {
                            al.Add(dprice[0]);
                            al.Add(dprice[1]);
                            al.Add(dprice[2]);
                        }
                        else
                        {
                            al.Add(0);
                            al.Add(0);
                            al.Add(0);
                        }
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }