예제 #1
0
 public SInvoiceMatchSContractVM()
 {
     RoomCService         = null;
     PackageCService      = null;
     AdditionalCService   = null;
     CancellationCService = null;
 }
예제 #2
0
        public static string SavePackageProduction(string sid, ArrayList blist)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                List <B_Package> lbp  = new List <B_Package>();
                DataTable        dt   = bpib.QueryTable(" and sid='" + sid + "'");
                Hashtable        garr = new Hashtable();
                ArrayList        gsid = new ArrayList();
                foreach (object[] obj in blist)
                {
                    DataRow [] dr   = dt.Select(" id=" + obj[0].ToString() + "");
                    B_Package  bp   = new B_Package();
                    string     bnum = obj[1].ToString();
                    bp.bnum    = Convert.ToInt32(bnum == "" ? "0" : bnum);
                    bp.bsid    = dr[0]["psid"].ToString();
                    bp.btype   = dr[0]["ptype"].ToString();
                    bp.bz      = 1;
                    bp.bzid    = dr[0]["id"].ToString();
                    bp.cdate   = DateTime.Now.ToString();
                    bp.csck    = 0;
                    bp.csrk    = 0;
                    bp.deep    = Convert.ToInt32(dr[0]["deep"].ToString());
                    bp.height  = Convert.ToInt32(dr[0]["height"].ToString());
                    bp.maker   = iv.u.ename;
                    bp.pname   = dr[0]["pname"].ToString();
                    bp.pcode   = dr[0]["pcode"].ToString();
                    bp.pnum    = 1;
                    bp.sid     = sid;
                    bp.sortnum = 0;
                    bp.width   = Convert.ToInt32(dr[0]["width"].ToString());
                    bp.zbck    = 0;
                    bp.zbrk    = 0;
                    if (!garr.Contains(bp.bsid))
                    {
                        garr.Add(bp.bsid, bp.bsid);
                    }
                    lbp.Add(bp);
                }
                if (lbp.Count > 0)
                {
                    foreach (DictionaryEntry de in garr)
                    {
                        gsid.Add(de.Value);
                    }
                    if (bpb.SavePackageList(gsid, lbp))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }