示例#1
0
        public List <Model.ObjSub> objsublist = null; //结果值
        protected override void SetPowerZone()
        {
            int id = Convert.ToInt32(Request.QueryString["xxid"]);

            uid.Value = id.ToString();
            objuser   = BLL.ObjUser.GetModel(id);
            obj       = BLL.OObject.GetModel(objuser.ObjID);
            oapply    = BLL.ObjUserApply.GetModelOID(objuser.BaoMingOID);
            listChild = BLL.ObjChild.GetModelList(" ID IN(" + oapply.SubID + ") ");
            listExcel = BLL.ObjExcel.GetModelList(" ObjOID='" + obj.ObjOID + "' ");


            objsample = BLL.ObjSample.GetModelOID(objuser.YangPinOID);
            obj       = BLL.OObject.GetModel(oapply.ObjID);
            tmember   = BLL.Member.GetModelByMID(oapply.MID);


            objsubuser = BLL.ObjSubUser.GetModelList(" SpInt=" + obj.ID + " AND MID='" + tmember.MID + "'").FirstOrDefault();
            if (objsubuser != null)
            {
                string[] sublist = objsubuser.Spare.Split(',');
                string   substr  = "";
                foreach (var item in sublist)
                {
                    if (string.IsNullOrEmpty(item))
                    {
                        continue;
                    }
                    substr += "'" + item + "',";
                }

                objsublist = BLL.ObjSub.GetModelList(" OID in(" + substr.Substring(0, substr.Length - 1) + ") ");
            }
        }
示例#2
0
        protected override string btnAdd_Click()
        {
            Hashtable MyHs = new Hashtable();

            Model.ObjSample os = BLL.ObjSample.GetModel(Convert.ToInt32(Request.Form["oaid"]));

            Model.ObjUser ou = BLL.ObjUser.GetModel(os.SpInt);
            if (os.SState != 0 && os.SState != 2)
            {
                return("状态已改变,请刷新页面");
            }

            os.YangPinCode = Request.Form["YangPinCode"];
            os.SState      = 1;
            BLL.ObjSample.Update(os, MyHs);
            ou.YState     = 1;
            ou.YangPinOID = os.OID;
            BLL.ObjUser.Update(ou, MyHs);
            if (BLL.CommonBase.RunHashtable(MyHs))
            {
                return("寄送成功");
            }
            else
            {
                return("寄送失败");
            }
        }
示例#3
0
        protected override string btnModify_Click()
        {
            Hashtable MyHs = new Hashtable();

            Model.ObjSample os = BLL.ObjSample.GetModel(Convert.ToInt32(Request.Form["oaid"]));

            Model.ObjUser ou = BLL.ObjUser.GetModel(os.SpInt);
            if (os.SState != 1)
            {
                return("状态已改变,请刷新页面");
            }

            os.SState = 2;
            BLL.ObjSample.Update(os, MyHs);
            ou.YState     = 2;
            ou.YangPinOID = os.OID;
            BLL.ObjUser.Update(ou, MyHs);
            if (BLL.CommonBase.RunHashtable(MyHs))
            {
                BLL.OperationRecordBLL.Add(TModel.MID, "返回重新寄送", "样品编号为:" + os.YangPinCode);
                return("已返回重新寄送");
            }
            else
            {
                return("返回失败");
            }
        }
示例#4
0
        protected override void SetPowerZone()
        {
            int oid = Convert.ToInt32(Request.QueryString["xxid"]);

            oaid.Value = oid.ToString();
            objS       = BLL.ObjSample.GetModel(oid);

            Model.OObject oobject = BLL.OObject.GetModel(objS.ObjID);


            objU = BLL.ObjUser.GetModelOID(objS.OjbOID);
            objA = BLL.ObjUserApply.GetModelOID(objU.BaoMingOID);

            YangPinCode.Value = oobject.ObjOID + "_" + objA.BMInt;

            listChild = BLL.ObjChild.GetModelList(" ID IN(" + objA.SubID + ") ");
            BMMember  = BLL.Member.GetModelByMID(objA.MID);
        }
        protected override string btnAdd_Click()
        {
            lock (lockobj)
            {
                Hashtable          MyHs    = new Hashtable();
                Model.ObjUserApply oamodel = BLL.ObjUserApply.GetModel(Convert.ToInt32(Request.Form["oaid"]));
                if (oamodel.SState != 0)
                {
                    return("此状态不能审核");
                }
                oamodel.SState = 3;
                int AddInt = Convert.ToInt32(BLL.CommonBase.GetSingle("select COUNT(*) from ObjUserApply where SState=3 and objID=" + oamodel.ObjID + ";"));
                oamodel.BMInt = 1000 + AddInt + 1;
                BLL.ObjUserApply.Update(oamodel, MyHs);

                Model.ObjUser oumodel = BLL.ObjUser.GetModelBaoMingOID(oamodel.BaoMingCode);
                oumodel.BState = 3;
                BLL.ObjUser.Update(oumodel, MyHs);

                Model.Member bmmember = BLL.Member.GetModelByMID(oamodel.MID);
                //添加样品表
                Model.ObjSample ObjS = new Model.ObjSample();
                ObjS.ObjID       = oamodel.ObjID;
                ObjS.MID         = oamodel.MID;
                ObjS.YangPinCode = "";
                ObjS.CreateDate  = DateTime.Now;
                ObjS.SState      = 0;
                ObjS.SpInt       = oumodel.ID;
                ObjS.Spare       = bmmember.Address;
                ObjS.OID         = Guid.NewGuid().ToString("N");
                ObjS.OjbOID      = oumodel.OID;
                BLL.ObjSample.Add(ObjS, MyHs);

                if (BLL.CommonBase.RunHashtable(MyHs))
                {
                    BLL.OperationRecordBLL.Add(TModel.MID, "报名信息审核成功", "报名编号为:" + oamodel.BaoMingCode);
                    return("审核成功");
                }
                else
                {
                    return("报名审核失败");
                }
            }
        }
示例#6
0
        protected override void SetPowerZone()
        {
            int oid = Convert.ToInt32(Request.QueryString["xxid"]);

            oaid.Value = oid.ToString();
            objS       = BLL.ObjSample.GetModel(oid);
            objU       = BLL.ObjUser.GetModelOID(objS.OjbOID);
            objA       = BLL.ObjUserApply.GetModelOID(objU.BaoMingOID);
            listChild  = BLL.ObjChild.GetModelList(" ID IN(" + objA.SubID + ") ");
            BMMember   = BLL.Member.GetModelByMID(objA.MID);
            Model.OObject objO = BLL.OObject.GetModel(objS.ObjID);

            listExcel = BLL.ObjExcel.GetModelList(" ObjOID='" + objO.ObjOID + "' ");

            Random rd = new Random();
            int    cc = rd.Next(1000, 9999);

            roam.Value = cc.ToString();
            rdstr      = cc.ToString();
        }