コード例 #1
0
        public JsonResult QueryCommonSizeCollection(string bjcode)
        {
            ArrayList           r  = new ArrayList();
            JsonData            d  = new JsonData();
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                Sys_SizeFormatPart lsf = ssfpb.Query(" and bjcode='" + bjcode + "'");
                d.d = js.Serialize(lsf);
            }
            else
            {
                d.d = iv.badstr;
            }
            return(Json(d));
        }
コード例 #2
0
        public static ArrayList QueryItemProduction(string sid, string gnum)
        {
            ArrayList           r  = new ArrayList();
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                r.Add(iv.badstr);
                List <B_ProductionItem> lbpi = bpib.QueryList(" and psid in (select psid from B_GroupProduction where sid='" + sid + "' and gnum=" + gnum + ") order by id");
                if (lbpi != null)
                {
                    foreach (B_ProductionItem bp in lbpi)
                    {
                        Sys_SizeFormatPart ssfp = ssfbb.Query(" and bjattr='" + bp.e_ptype + "' and bjattrex='" + bp.e_ptypeex + "'");
                        ArrayList          al   = new ArrayList();
                        al.Add(bp.id);
                        al.Add(bp.pname);
                        al.Add(bp.pcode);
                        al.Add(bp.height);
                        al.Add(bp.width);
                        al.Add(bp.deep);
                        al.Add(bp.pnum);
                        if (ssfp != null)
                        {
                            al.Add(ssfp.bjname);
                        }
                        else
                        {
                            al.Add("");
                        }
                        al.Add(bp.ptype);
                        al.Add(bp.e_ptype);
                        al.Add(bp.e_ptypeex);
                        al.Add(bp.addattr == "" ? "o" : bp.addattr);
                        r.Add(al);
                    }
                }
            }
            else
            {
                r.Add(iv.badstr);
            }
            return(r);
        }
コード例 #3
0
        public JsonResult SaveSizeCollection(string fpcode, string fpname, object[][] plist)
        {
            string   r = "";
            JsonData d = new JsonData();
            Sys_SizeFomatCondition sb = new Sys_SizeFomatCondition();
            SessionUserValidate    iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                List <Sys_SizeFormatCollection> al = new List <Sys_SizeFormatCollection>();
                if (plist != null)
                {
                    foreach (object[] o in plist)
                    {
                        if (Convert.ToInt32(o[6].ToString()) > 0)
                        {
                            Sys_SizeFormatPart       sp  = ssfpb.Query(" and bjcode='" + o[1].ToString() + "'");
                            Sys_SizeFomatCondition   sal = sscb.Query(" and  sfccode='" + fpcode + "'");
                            Sys_SizeFormatCollection sc  = new Sys_SizeFormatCollection();
                            if (sp != null)
                            {
                                sc.bjname   = sp.bjname;
                                sc.bjcode   = sp.bjcode;
                                sc.bjattr   = sp.bjattr;
                                sc.bjattrex = sp.bjattrex;
                                sc.bjpname  = sp.bjcname;
                                sc.bjtype   = sp.bjctype;
                            }
                            else
                            {
                                sc.bjname   = "";
                                sc.bjcode   = "";
                                sc.bjattr   = "";
                                sc.bjattrex = "";
                                sc.bjpname  = "";
                                sc.bjtype   = "";
                            }
                            sc.hstr    = o[3].ToString();
                            sc.wstr    = o[4].ToString();
                            sc.dstr    = o[5].ToString();
                            sc.bjnum   = Convert.ToInt32(o[6].ToString());
                            sc.ftype   = o[8].ToString();
                            sc.sfccode = fpcode;
                            sc.sfcname = fpname;
                            if (sal != null)
                            {
                                sc.sfcode = sal.sfcode;
                                sc.sfname = sal.sfname;
                            }
                            else
                            {
                                sc.sfcode = "";
                                sc.sfname = "";
                            }
                            sc.bjtj = o[7].ToString();
                            al.Add(sc);
                        }
                    }
                }
                if (al.Count() > 0)
                {
                    if (ssfb.AddList(fpcode, al))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    r = "F";
                }
                d.d = r;
            }
            else
            {
                d.d = iv.badstr;
            }
            return(Json(d));
        }