Ejemplo n.º 1
0
        protected override string btnAdd_Click()
        {
            Hashtable HS = new Hashtable();

            Model.OObject obj = BLL.OObject.GetModel(Convert.ToInt32(Request.Form["xxid"]));
            obj.ObjName  = Request.Form["ObjName"];
            obj.Remark   = Request.Form["Remark"];
            obj.ObjExcel = "";
            obj.ObjChild = "";

            //如果是被打回的项目
            if (obj.OState == 2)
            {
                obj.ReSpare = "";
                obj.OState  = 0;
            }
            if (TModel.Role.IsAdmin)
            {
                obj.SState = Convert.ToInt32(Request.Form["txtJSStatus"]);
            }

            obj.BMDate = Convert.ToDateTime(Request.Form["BMstateDate"]);
            obj.JGDate = Convert.ToDateTime(Request.Form["ComDate"]);
            if (BLL.OObject.Update(obj))
            {
                BLL.OperationRecordBLL.Add(TModel.MID, "修改项目", "OID为:" + obj.ObjOID);
                return("修改项目成功");
            }
            else
            {
                return("修改项目失败");
            }
        }
Ejemplo n.º 2
0
        protected override void SetPowerZone()
        {
            int pid = Convert.ToInt32(Request.QueryString["xxid"]);

            oid.Value = pid.ToString();

            int bm = Convert.ToInt32(Request.QueryString["bmid"]);

            bmid.Value = bm.ToString();

            oua              = BLL.ObjUserApply.GetModel(bm);
            uploadurl.Value  = oua.BaoMingImgUrl;
            uploadurl2.Value = oua.FeiYongImgUrl;


            obj       = BLL.OObject.GetModel(pid);
            listExcel = BLL.ObjExcel.GetModelList(" ObjOID='" + obj.ObjOID + "' ");
            listChild = BLL.ObjChild.GetModelList(" ObjOID='" + obj.ObjOID + "' ");
            Random rd = new Random();
            int    cc = rd.Next(1000, 9999);

            roam.Value  = cc.ToString();
            roam2.Value = cc.ToString();
            rdstr       = cc.ToString();
        }
Ejemplo n.º 3
0
        protected override string btnModify_Click()
        {
            string    xx   = Request.Form["remsg"];
            Hashtable MyHs = new Hashtable();

            Model.OObject oamodel = BLL.OObject.GetModel(Convert.ToInt32(Request.Form["oid"]));
            if (oamodel.OState != 0)
            {
                return("此状态不能打回");
            }
            oamodel.OState   = 2;
            oamodel.ReSpare  = xx;
            oamodel.ObjExcel = "";
            oamodel.ObjChild = "";

            if (BLL.OObject.Update(oamodel))
            {
                BLL.OperationRecordBLL.Add(TModel.MID, "验证项目打回", "OID为:" + oamodel.ObjOID);
                return("打回成功");
            }
            else
            {
                return("验证项目审核打回失败");
            }
        }
Ejemplo n.º 4
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) + ") ");
            }
        }
Ejemplo n.º 5
0
        protected override void SetPowerZone()
        {
            int oid = Convert.ToInt32(Request.QueryString["xxid"]);

            oaid.Value = oid.ToString();
            oapply     = BLL.ObjUserApply.GetModel(oid);
            listChild  = BLL.ObjChild.GetModelList(" ID IN(" + oapply.SubID + ") ");
            obj        = BLL.OObject.GetModel(oapply.ObjID);
            tmember    = BLL.Member.GetModelByMID(oapply.MID);
        }
Ejemplo n.º 6
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string strWhere = "'1'='1'";

            if (!string.IsNullOrEmpty(context.Request["nTitle"]))
            {
                strWhere += " and  objID IN(SELECT ID FROM OObject WHERE OBJNAME='" + context.Request["nTitle"] + "') ";
            }

            if (!string.IsNullOrEmpty(context.Request["bmoid"]))
            {
                strWhere += " and OBJID=" + context.Request["bmoid"] + "";
            }

            //如果是单位部门的话 能管理自己发布的项目
            if (!TModel.Role.IsAdmin)
            {
                strWhere += " and  objID IN(SELECT ID FROM OObject WHERE ReObjMID='" + TModel.MID + "') ";
            }

            int count;
            List <Model.ObjUserApply> ListO = BLL.ObjUserApply.GetList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListO.Count; i++)
            {
                Model.OObject obj = BLL.OObject.GetModel(ListO[i].ObjID);
                sb.Append(ListO[i].ID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(obj.ObjOID + "~");
                sb.Append(obj.ObjName + "~");
                sb.Append(ListO[i].BaoMingCode + "~");
                sb.Append(ListO[i].DanWeiName + "~");
                sb.Append(ListO[i].MID + "~");

                sb.Append(ListO[i].CreateDate.ToString("yyyy-MM-dd HH:mm") + "~");
                sb.Append("<a href='" + ListO[i].FeiYongImgUrl + "' target='_blank'><img width='80' height='80' src='" + ListO[i].FeiYongImgUrl + "' /></a>" + "~");
                sb.Append("<a href='" + ListO[i].BaoMingImgUrl + "' target='_blank'><img width='80' height='80' src='" + ListO[i].BaoMingImgUrl + "' /></a>" + "~");
                sb.Append(ListO[i].ReSpare + "~");
                sb.Append(ListO[i].SState.ToString().Replace("0", "未审核").Replace("1", "审核不通过").Replace("3", "审核通过") + "~");
                sb.Append((ListO[i].SState == 0 ? "<div  class=\"pay btn btn-success\" onclick=\"callhtml('/ProjectManage/SHSignProject.aspx?xxid=" + ListO[i].ID + "','审核报名信息')\">审核报名</ div > " : ""));
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
Ejemplo n.º 7
0
        protected override void SetPowerZone()
        {
            int pid = Convert.ToInt32(Request.QueryString["xxid"]);

            oid.Value = pid.ToString();
            obj       = BLL.OObject.GetModel(pid);
            listExcel = BLL.ObjExcel.GetModelList(" ObjOID='" + obj.ObjOID + "' ");
            listChild = BLL.ObjChild.GetModelList(" ObjOID='" + obj.ObjOID + "' ");
            Random rd = new Random();
            int    cc = rd.Next(1000, 9999);

            roam.Value  = cc.ToString();
            roam2.Value = cc.ToString();
            rdstr       = cc.ToString();
        }
Ejemplo n.º 8
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string strWhere = "'1'='1'";

            if (!string.IsNullOrEmpty(context.Request["IsState"]))
            {
                strWhere += " and SState in(" + HttpUtility.UrlDecode(context.Request["IsState"]) + ")";
            }

            if (!string.IsNullOrEmpty(context.Request["bmoid"]))
            {
                strWhere += " and OBJID=" + context.Request["bmoid"] + "";
            }

            //如果是单位部门的话 能管理自己发布的项目
            if (!TModel.Role.IsAdmin)
            {
                strWhere += " and  objID IN(SELECT ID FROM OObject WHERE ReObjMID='" + TModel.MID + "') ";
            }
            int count;
            List <Model.ObjSample> ListO = BLL.ObjSample.GetList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListO.Count; i++)
            {
                Model.OObject      obj    = BLL.OObject.GetModel(ListO[i].ObjID);
                Model.ObjUser      ouser  = BLL.ObjUser.GetModel(ListO[i].SpInt);
                Model.ObjUserApply oapply = BLL.ObjUserApply.GetModelOID(ouser.BaoMingOID);
                sb.Append(ListO[i].ID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(obj.ObjOID + "~");
                sb.Append(obj.ObjName + "~");
                sb.Append(ouser.DanWeiName + "~");
                sb.Append(ListO[i].Spare + "~");
                sb.Append("<a href='" + ListO[i].YangPinImgUrl + "' target='_blank'><img width='80' height='80' src='" + ListO[i].YangPinImgUrl + "' /></a>" + "~");
                sb.Append(oapply.CreateDate.ToString("yyyy-MM-dd HH:mm") + "~");
                sb.Append(ListO[i].SState.ToString().Replace("0", "未寄送").Replace("1", "已寄送,未确认").Replace("2", "损坏,待重新寄送").Replace("3", "寄送完成") + "~");
                sb.Append(((ListO[i].SState == 0 || ListO[i].SState == 2) ? "<div  class=\"pay btn btn-success\" onclick=\"callhtml('/ProjectManage/SampleJS.aspx?xxid=" + ListO[i].ID + "','样品寄送')\">样品寄送</ div > " : ""));
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
Ejemplo n.º 9
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);
        }
Ejemplo n.º 10
0
        protected override void SetPowerZone()
        {
            base.SetPowerZone();
            Random rd = new Random();

            //int dd=rd.Next(100000,999999);
            ObjCode.Value = Guid.NewGuid().ToString("N");
            xxid.Value    = Request.QueryString["xxid"];
            Model.OObject objModel = BLL.OObject.GetModel(Convert.ToInt32(Request.QueryString["xxid"]));
            listChild         = BLL.ObjChild.GetModelList(" OBJOID = '" + objModel.ObjOID + "' ");
            listExcel         = BLL.ObjExcel.GetModelList(" OBJOID = '" + objModel.ObjOID + "' ");
            Remark.Value      = objModel.Remark;
            BMstateDate.Value = objModel.BMDate.ToString();
            ComDate.Value     = objModel.JGDate.ToString();
            ObjName.Value     = objModel.ObjName;
            ObjCode.Value     = objModel.ObjOID;
            txtJSStatus.Value = objModel.SState.ToString();
        }
Ejemplo n.º 11
0
        protected override void SetPowerZone()
        {
            int pid = Convert.ToInt32(Request.QueryString["xxid"]);

            OUSER     = BLL.ObjUser.GetModel(pid);
            uid.Value = pid.ToString();
            oid.Value = OUSER.ObjID.ToString();
            obj       = BLL.OObject.GetModel(OUSER.ObjID);

            Model.ObjUserApply oA = BLL.ObjUserApply.GetModelOID(OUSER.BaoMingOID);
            listExcel = BLL.ObjExcel.GetModelList(" ObjOID='" + obj.ObjOID + "' ");
            listChild = BLL.ObjChild.GetModelList(" ID in(" + oA.SubID + ") ");
            Random rd = new Random();
            int    cc = rd.Next(1000, 9999);

            roam.Value = cc.ToString();
            rdstr      = cc.ToString();
        }
Ejemplo n.º 12
0
 protected override string btnAdd_Click()
 {
     Model.OObject oamodel = BLL.OObject.GetModel(Convert.ToInt32(Request.Form["oid"]));
     if (oamodel.OState != 0)
     {
         return("此状态不能通过");
     }
     oamodel.OState   = 3;
     oamodel.ObjExcel = "";
     oamodel.ObjChild = "";
     if (BLL.OObject.Update(oamodel))
     {
         BLL.OperationRecordBLL.Add(TModel.MID, "验证项目通过", "OID为:" + oamodel.ObjOID);
         return("审核通过");
     }
     else
     {
         return("验证项目审核失败");
     }
 }
Ejemplo n.º 13
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();
        }
Ejemplo n.º 14
0
        protected override void SetPowerZone()
        {
            int id = Convert.ToInt32(Request.QueryString["xxid"]);

            oid.Value = id.ToString();

            objuser = BLL.ObjUser.GetModel(id);
            obj     = BLL.OObject.GetModel(objuser.ObjID);

            if (!string.IsNullOrEmpty(objuser.Spare))
            {
                listDown = objuser.Spare.Split(';').ToList();
                //foreach (var item in xx)
                //{
                //    if (!string.IsNullOrEmpty(item))
                //    {
                //        listDown.Add(item);
                //    }
                //}
            }
        }
Ejemplo n.º 15
0
        protected override string btnAdd_Click()
        {
            Model.ObjUserApply oua = BLL.ObjUserApply.GetModel(Convert.ToInt32(Request.Form["bmid"]));
            if (oua.SState != 1)
            {
                return("此状态不能修改报名信息");
            }

            Model.OObject obj = BLL.OObject.GetModel(Convert.ToInt32(Request.Form["oid"]));

            if (obj.BMDate < DateTime.Now)
            {
                return("已超出报名时间,不能修改");
            }

            Hashtable MyHs = new Hashtable();

            oua.CreateDate    = DateTime.Now;
            oua.ComDate       = DateTime.MaxValue;
            oua.SubID         = Request.Form["ChildValue"];
            oua.BaoMingImgUrl = Request.Form["uploadurl"];
            oua.FeiYongImgUrl = Request.Form["uploadurl2"];
            oua.SState        = 0;
            oua.ReSpare       = "";
            BLL.ObjUserApply.Update(oua, MyHs);

            Model.ObjUser oumodel = BLL.ObjUser.GetModelBaoMingOID(oua.BaoMingCode);
            oumodel.BState = 0;
            BLL.ObjUser.Update(oumodel, MyHs);
            if (BLL.CommonBase.RunHashtable(MyHs))
            {
                BLL.OperationRecordBLL.Add(TModel.MID, "修改报名信息", "报名编号为:" + oua.BaoMingCode);
                return("报名修改成功");
            }
            else
            {
                return("报名修改失败");
            }
        }
Ejemplo n.º 16
0
        protected override void SetPowerZone()
        {
            int pid = Convert.ToInt32(Request.QueryString["xxid"]);

            OUSER     = BLL.ObjUser.GetModel(pid);
            uid.Value = pid.ToString();         // ObjUser ID
            oid.Value = OUSER.ObjID.ToString(); //OObject ID
            obj       = BLL.OObject.GetModel(OUSER.ObjID);

            Model.ObjUserApply oA = BLL.ObjUserApply.GetModelOID(OUSER.BaoMingOID);
            listExcel = BLL.ObjExcel.GetModelList(" ObjOID='" + obj.ObjOID + "' ");

            OSU           = BLL.ObjSubUser.GetModelList(" MID='" + OUSER.MID + "' AND SpInt=" + obj.ID + " and SState!=3 ").FirstOrDefault();
            osuid.Value   = OSU.ID.ToString();
            FangFa.Value  = OSU.RFangFa;
            YiQi.Value    = OSU.RSheBei;
            YiChang.Value = OSU.RYiChang;

            string[] sublist = OSU.Spare.Split(',');
            string   substr  = "";

            foreach (var item in sublist)
            {
                if (string.IsNullOrEmpty(item))
                {
                    continue;
                }
                substr += "'" + item + "',";
            }

            listChild = BLL.ObjSub.GetModelList(" OID in(" + substr.Substring(0, substr.Length - 1) + ") ");
            Random rd = new Random();
            int    cc = rd.Next(1000, 9999);

            rdstr = cc.ToString();
        }
Ejemplo n.º 17
0
        protected override string btnAdd_Click()
        {
            Hashtable MyHs = new Hashtable();

            Model.ObjUser OU = BLL.ObjUser.GetModel(Convert.ToInt32(Request.Form["uid"]));

            Model.OObject objxx = BLL.OObject.GetModel(OU.ObjID);

            if (Convert.ToInt32(BLL.CommonBase.GetSingle("select COUNT(*) from ObjSubUser where mid='" + TModel.MID + "' AND SpInt='" + OU.ObjID + "' and SState!=3 and sstate!=0;")) > 0)
            {
                return("您已提交过结果,请等待审核");
            }

            OU.RState      = 1;
            OU.RImgUrl     = Request.Form["uploadurl"];
            OU.RUpLoadDate = DateTime.Now;
            BLL.ObjUser.Update(OU, MyHs);

            Model.ObjUserApply    oA         = BLL.ObjUserApply.GetModelOID(OU.BaoMingOID);
            List <Model.ObjChild> listChild2 = BLL.ObjChild.GetModelList(" ID in(" + oA.SubID + ") ");
            string suboid = "";

            foreach (var item in listChild2)
            {
                string childone = Request.Form["ChildOne" + item.ID.ToString()];
                string childtwo = Request.Form["ChildTwo" + item.ID.ToString()];
                string childavg = Request.Form["ChildAvg" + item.ID.ToString()];

                if (string.IsNullOrEmpty(childone) || string.IsNullOrEmpty(childtwo) || string.IsNullOrEmpty(childavg))
                {
                    return("请填入结果值");
                }
                Model.ObjSub OSub = new Model.ObjSub();
                OSub.MID       = TModel.MID;
                OSub.OID       = Guid.NewGuid().ToString("N");
                OSub.ResultOne = childone;
                OSub.ResultTwo = childtwo;
                OSub.ResultAvg = childavg;
                OSub.Spare     = item.ChildName;
                OSub.CID       = item.ID;
                OSub.ObjID     = objxx.ID;
                OSub.ObjOID    = objxx.ObjOID;
                OSub.URID      = OU.ID;
                OSub.SpInt     = oA.ID;
                BLL.ObjSub.Add(OSub, MyHs);
                suboid += OSub.OID + ",";
            }

            //如果已有提交结果就修改,未提交过就生成
            Model.ObjSubUser reOBJSUB = BLL.ObjSubUser.GetModelList(" mid='" + TModel.MID + "' AND SpInt='" + OU.ObjID + "' and sstate=0;").FirstOrDefault();
            if (reOBJSUB == null)
            {
                Model.ObjSubUser objapply = new Model.ObjSubUser();
                objapply.MID          = TModel.MID;
                objapply.RFangFa      = Request.Form["FangFa"];
                objapply.RSheBei      = Request.Form["YiQi"];
                objapply.RYiChang     = Request.Form["YiChang"];
                objapply.ResultImgUrl = Request.Form["uploadurl"];
                objapply.SpInt        = Convert.ToInt32(Request.Form["oid"]);
                objapply.MID          = TModel.MID;
                objapply.SState       = 0;
                objapply.Spare        = suboid.Substring(0, suboid.Length - 1);
                BLL.ObjSubUser.Add(objapply, MyHs);
            }
            else
            {
                reOBJSUB.MID          = TModel.MID;
                reOBJSUB.RFangFa      = Request.Form["FangFa"];
                reOBJSUB.RSheBei      = Request.Form["YiQi"];
                reOBJSUB.RYiChang     = Request.Form["YiChang"];
                reOBJSUB.ResultImgUrl = Request.Form["uploadurl"];
                reOBJSUB.SpInt        = Convert.ToInt32(Request.Form["oid"]);
                reOBJSUB.MID          = TModel.MID;
                reOBJSUB.SState       = 0;
                reOBJSUB.Spare        = suboid.Substring(0, suboid.Length - 1);
                BLL.ObjSubUser.Update(reOBJSUB, MyHs);
            }


            if (BLL.CommonBase.RunHashtable(MyHs))
            {
                BLL.OperationRecordBLL.Add(TModel.MID, "结果提交", "项目名称为:" + objxx.ObjName);
                return("结果提交成功,请等待审核");
            }
            else
            {
                return("提交失败");
            }
        }
Ejemplo n.º 18
0
        protected override string btnAdd_Click()
        {
            Hashtable HS = new Hashtable();

            Model.OObject obj = new Model.OObject();
            obj.ObjName     = Request.Form["ObjName"];
            obj.ObjOID      = Request.Form["ObjCode"];
            obj.ReObjMID    = TModel.MID;
            obj.SState      = 0;
            obj.ObjChild    = "";
            obj.ObjExcel    = "";
            obj.CreateDate  = DateTime.Now;
            obj.ReObjNiName = TModel.MName;
            obj.Remark      = Request.Form["Remark"];
            obj.BMDate      = Convert.ToDateTime(Request.Form["BMstateDate"]);
            obj.JGDate      = Convert.ToDateTime(Request.Form["ComDate"]);
            BLL.OObject.Add(obj, HS);
            int subcount = Convert.ToInt32(Request.Form["SubAddIndex"]);
            int count    = 0;

            for (int i = 1; i <= subcount; i++)
            {
                int ix = i;
                if (string.IsNullOrEmpty(Request.Form["SubTitle" + i]))
                {
                    continue;
                }
                else
                {
                    count += 1;
                    Model.ObjChild sub = new Model.ObjChild();
                    sub.OID        = Guid.NewGuid().ToString("N");
                    sub.ObjOID     = obj.ObjOID;
                    sub.ChildName  = Request.Form["SubTitle" + i];
                    sub.ChildValue = Request.Form["SubDetails" + i];
                    BLL.ObjChild.Add(sub, HS);
                }
            }
            if (count <= 0)
            {
                return("请至少填写一项检测子项");
            }


            if (string.IsNullOrEmpty(Request.Form["excelValue"]))
            {
                return("请上传文档");
            }
            string[] xx = Request.Form["excelValue"].Split(';');
            foreach (var item in xx)
            {
                if (string.IsNullOrEmpty(item))
                {
                    continue;
                }
                Model.ObjExcel excel = new Model.ObjExcel();
                excel.OID       = Guid.NewGuid().ToString("N");
                excel.ObjOID    = obj.ObjOID;
                excel.ExcelName = item.Substring(33, item.Length - 33);
                excel.ExcelUrl  = item;
                BLL.ObjExcel.Add(excel, HS);
            }

            if (BLL.CommonBase.RunHashtable(HS))
            {
                BLL.OperationRecordBLL.Add(TModel.MID, "添加项目", "OID为:" + obj.ObjOID);
                return("添加项目成功");
            }
            else
            {
                return("添加项目失败");
            }
        }
Ejemplo n.º 19
0
        protected override string btnAdd_Click()
        {
            if (!TModel.MState)
            {
                return("您的账号未审核,不能报名");
            }
            Model.OObject obj = BLL.OObject.GetModel(Convert.ToInt32(Request.Form["oid"]));

            if (Convert.ToInt32(BLL.CommonBase.GetSingle("select COUNT(*) from ObjUserApply where MID='" + TModel.MID + "' and [OBJID]=" + obj.ID + " and YZState=0;")) > 0)
            {
                return("您已报名该项目,请自行查看进度");
            }
            if (obj.SState == 1)
            {
                return("该项目已结束,不能报名");
            }

            if (obj.BMDate < DateTime.Now)
            {
                return("已超出报名时间,不能报名");
            }

            Hashtable MyHs = new Hashtable();

            Model.ObjUserApply oua = new Model.ObjUserApply();
            oua.ObjID         = obj.ID;
            oua.MID           = TModel.MID;
            oua.BaoMingCode   = Guid.NewGuid().ToString("N");
            oua.DanWeiName    = TModel.MName;
            oua.ZiGeZhengShu  = TModel.FMID.Replace("0", "检测机构证书").Replace("1", "个人身份证").Replace("2", "其他");
            oua.ZhengShuCode  = TModel.NumID;
            oua.CreateDate    = DateTime.Now;
            oua.ComDate       = DateTime.MaxValue;
            oua.SubID         = Request.Form["ChildValue"];
            oua.BaoMingImgUrl = Request.Form["uploadurl"];
            oua.FeiYongImgUrl = Request.Form["uploadurl2"];
            oua.SState        = 0;
            BLL.ObjUserApply.Add(oua, MyHs);


            Model.ObjUser user = new Model.ObjUser();
            user.OID        = Guid.NewGuid().ToString("N");
            user.BaoMingOID = oua.BaoMingCode;
            user.ObjID      = obj.ID;
            user.ObjName    = obj.ObjName;
            user.USState    = 0;
            user.CreateDate = DateTime.Now;
            user.DanWeiName = TModel.MName;
            user.RState     = 0;
            user.BState     = 0;
            user.YState     = 0;
            user.YangPinOID = "";
            user.MID        = TModel.MID;
            BLL.ObjUser.Add(user, MyHs);
            if (BLL.CommonBase.RunHashtable(MyHs))
            {
                BLL.OperationRecordBLL.Add(TModel.MID, "报名成功", "项目名称为:" + obj.ObjName + ",报名编号为:" + oua.BaoMingCode);
                return("报名成功");
            }
            else
            {
                return("报名失败");
            }
        }
Ejemplo n.º 20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     obj       = BLL.OObject.GetModel(Convert.ToInt32(Request.QueryString["oid"]));
     listChild = BLL.ObjChild.GetModelList(" OBJOID = '" + obj.ObjOID + "' ");
     listExcel = BLL.ObjExcel.GetModelList(" OBJOID = '" + obj.ObjOID + "' ");
 }
Ejemplo n.º 21
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string strWhere = "'1'='1' ";


            if (!string.IsNullOrEmpty(context.Request["nBMTitle"]))
            {
                strWhere += " and DanWeiName like '%" + HttpUtility.UrlDecode(context.Request["nBMTitle"]) + "%'";
            }

            if (!string.IsNullOrEmpty(context.Request["nTitle"]))
            {
                strWhere += " and ObjName like '%" + HttpUtility.UrlDecode(context.Request["nTitle"]) + "%'";
            }

            if (!string.IsNullOrEmpty(context.Request["IsBMState"]))
            {
                strWhere += " and BState in(" + HttpUtility.UrlDecode(context.Request["IsBMState"]) + ")";
            }

            if (!string.IsNullOrEmpty(context.Request["IsYangPin"]))
            {
                strWhere += " and YState in(" + HttpUtility.UrlDecode(context.Request["IsYangPin"]) + ")";
            }

            if (!string.IsNullOrEmpty(context.Request["IsRState"]))
            {
                strWhere += " and RState in(" + HttpUtility.UrlDecode(context.Request["IsRState"]) + ")";
            }

            if (!string.IsNullOrEmpty(context.Request["bmoid"]))
            {
                strWhere += " and OBJID=" + context.Request["bmoid"] + "";
            }
            if (!string.IsNullOrEmpty(context.Request["mid"]))
            {
                strWhere += " and MID='" + context.Request["mid"] + "'";
            }
            if (!string.IsNullOrEmpty(context.Request["nBMDW"]))
            {
                strWhere += " and MID='" + context.Request["nBMDW"] + "'";
            }
            //如果是单位部门的话 能管理自己发布的项目
            if (!TModel.Role.IsAdmin)
            {
                strWhere += " and  objID IN(SELECT ID FROM OObject WHERE ReObjMID='" + TModel.MID + "') ";
            }

            if (!string.IsNullOrEmpty(context.Request["IsSState"]))
            {
                strWhere += " and  objID IN(SELECT ID FROM OObject WHERE SState='" + context.Request["IsSState"] + "') ";
            }

            int count;
            List <Model.ObjUser> ListO = BLL.ObjUser.GetList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListO.Count; i++)
            {
                Model.OObject obj = BLL.OObject.GetModel(ListO[i].ObjID);
                //Model.ObjSubUser objsub = BLL.ObjSubUser.GetModelList(" SpInt=" + obj.ID + " and MID='" + TModel.MID + "' ").FirstOrDefault();
                sb.Append(ListO[i].ID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(ListO[i].DanWeiName + "~");
                sb.Append(ListO[i].MID + "~");
                sb.Append(ListO[i].ObjName + "~");
                sb.Append(obj.JGDate + "~");
                //sb.Append((objsub != null ? objsub.ResultOne : "") + "~");
                //sb.Append((objsub != null ? objsub.ResultTwo : "") + "~");
                //sb.Append((objsub != null ? objsub.ResultAvg : "") + "~");
                sb.Append((ListO[i].BState.ToString().Replace("0", "未审核").Replace("1", "打回").Replace("3", "<span style='color:green;'>已审核</span>")) + "~");
                sb.Append((ListO[i].YState.ToString().Replace("0", "未寄送").Replace("1", "已寄送").Replace("2", "样品损坏").Replace("3", "<span style='color:green;'>样品确认</span>")) + "~");
                sb.Append((ListO[i].YState.ToString() == "3" ? "<span style='color:green;'>样品已确认</span>" : "未确认") + "~");
                string isSubResult = "";
                if (ListO[i].RState == 1)
                {
                    isSubResult = "<div  class=\"pay btn btn-success\" onclick=\"callhtml('/ProjectManage/SHValidationResult.aspx?xxid=" + ListO[i].ID + "','审核结果')\">审核结果</div>";
                }
                sb.Append((ListO[i].RState.ToString().Replace("0", "等待提交").Replace("1", "等待审核").Replace("2", "审核失败").Replace("3", "<span style='color:green;'>审核通过</span>") + isSubResult) + "~");
                sb.Append((ListO[i].USState.ToString().Replace("0", "待审核").Replace("2", "打回").Replace("3", "审核通过")) + "~");

                sb.Append((string.IsNullOrEmpty(ListO[i].Spare)? "<div  class=\"pay btn btn-success\" onclick=\"callhtml('/ProjectManage/AddResultDown.aspx?xxid=" + ListO[i].ID + "','上传报告')\">上传报告</div>" : "<div  class=\"pay btn btn-success\" onclick=\"callhtml('/ProjectManage/AddResultDown.aspx?xxid=" + ListO[i].ID + "','报告下载')\">报告下载</div>") + "~");

                int shcount = Convert.ToInt32(BLL.CommonBase.GetSingle("select COUNT(*) from ObjSub where MID='" + ListO[i].MID + "' and [objid]=" + ListO[i].ObjID + " and URID=" + ListO[i].ID + " and (SHInt=0 or SHInt=2)"));
                if (shcount <= 0)
                {
                    sb.Append((ListO[i].USState == 3 ? "<span style='color:green;'><a href='javascript:void(0)' style='color:green;' onclick=\"callhtml('/ProjectManage/PutZhengShu.aspx?xxid=" + ListO[i].ID + "','打印证书')\" >打印证书</a></span>" : "未通过") + "~");
                }
                else
                {
                    sb.Append("未通过~");
                }


                sb.Append("<div  class=\"pay btn btn-success\" onclick=\"callhtml('/ProjectManage/ObjectView.aspx?xxid=" + ListO[i].ID + "','流程')\">流程</div>");
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
Ejemplo n.º 22
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string strWhere = "'1'='1' and MID='" + TModel.MID + "' ";


            if (!string.IsNullOrEmpty(context.Request["nTitle"]))
            {
                strWhere += " and ObjName like '%" + HttpUtility.UrlDecode(context.Request["nTitle"]) + "%'";
            }

            if (!string.IsNullOrEmpty(context.Request["IsBMState"]))
            {
                strWhere += " and BState in(" + HttpUtility.UrlDecode(context.Request["IsBMState"]) + ")";
            }

            if (!string.IsNullOrEmpty(context.Request["IsYangPin"]))
            {
                strWhere += " and YState in(" + HttpUtility.UrlDecode(context.Request["IsYangPin"]) + ")";
            }

            if (!string.IsNullOrEmpty(context.Request["IsRState"]))
            {
                strWhere += " and RState in(" + HttpUtility.UrlDecode(context.Request["IsRState"]) + ")";
            }
            int count;
            List <Model.ObjUser> ListO = BLL.ObjUser.GetList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListO.Count; i++)
            {
                Model.OObject obj = BLL.OObject.GetModel(ListO[i].ObjID);
                sb.Append(ListO[i].ID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(ListO[i].DanWeiName + "~");
                sb.Append(ListO[i].ObjName + "~");
                sb.Append(obj.JGDate + "~");
                //sb.Append((objsub!=null?objsub.ResultOne:"") + "~");
                //sb.Append((objsub != null ? objsub.ResultTwo : "") + "~");
                //sb.Append((objsub != null ? objsub.ResultAvg : "") + "~");
                sb.Append((ListO[i].BState == 0?"待审核": "<span style='color:green;'>已通过</span>") + "~");
                sb.Append((ListO[i].YState.ToString().Replace("0", "未寄送").Replace("1", "已寄送").Replace("2", "样品损坏").Replace("3", "<span style='color:green;'>样品确认</span>")) + "~");
                sb.Append((ListO[i].YState.ToString() == "3"? "<span style='color:green;'>样品已确认</span>" : "未确认") + "~");

                string isSubResult = "";
                if (ListO[i].YState == 3 && ListO[i].RState == 0)
                {
                    isSubResult = "<div  class=\"pay btn btn-success\" onclick=\"callhtml('/ProjectManage/ValidationResult.aspx?xxid=" + ListO[i].ID + "','提交结果')\">提交结果</div>";
                }

                sb.Append((ListO[i].RState.ToString().Replace("0", "等待提交").Replace("1", "等待审核").Replace("2", "审核失败").Replace("3", "<span style='color:green;'>审核通过</span>") + isSubResult) + "~");
                sb.Append((ListO[i].RState == 3? "<div  class=\"pay btn btn-success\" onclick=\"callhtml('/ProjectManage/AddResultDown.aspx?xxid=" + ListO[i].ID + "','报告下载')\">报告下载</div>" : "") + "~");
                sb.Append((ListO[i].USState == 0 ? "待审核" : "<span style='color:green;'>已通过</span>") + "~");
                sb.Append((ListO[i].USState == 3 ? "<span style='color:green;'><a href='javascript:void(0)' style='color:green;' onclick=\"callhtml('/ProjectManage/PutZhengShu.aspx?xxid=" + ListO[i].ID + "','打印证书')\" >打印证书</a></span>" : "未通过") + "~");
                sb.Append("<div  class=\"pay btn btn-success\" onclick=\"callhtml('/ProjectManage/ObjectView.aspx?xxid=" + ListO[i].ID + "','流程')\">流程</div>");
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }
Ejemplo n.º 23
0
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);
            string strWhere = "'1'='1' ";

            //if (!string.IsNullOrEmpty(context.Request["nBMTitle"]))
            //{
            //    strWhere += " and DanWeiName like '%" + HttpUtility.UrlDecode(context.Request["nBMTitle"]) + "%'";
            //}

            if (!string.IsNullOrEmpty(context.Request["HYmid"]))
            {
                strWhere += " and MID like '%" + context.Request["HYmid"] + "%'";
            }

            //if (!string.IsNullOrEmpty(context.Request["IsBMState"]))
            //{
            //    strWhere += " and BState in(" + HttpUtility.UrlDecode(context.Request["IsBMState"]) + ")";
            //}

            //if (!string.IsNullOrEmpty(context.Request["IsYangPin"]))
            //{
            //    strWhere += " and YState in(" + HttpUtility.UrlDecode(context.Request["IsYangPin"]) + ")";
            //}

            if (!string.IsNullOrEmpty(context.Request["SHState"]))
            {
                strWhere += " and SHInt =" + context.Request["SHState"] + " ";
            }

            if (!string.IsNullOrEmpty(context.Request["ObjCode"]))
            {
                strWhere += " and  objOID =  '" + context.Request["ObjCode"].Trim() + "' ";
            }

            if (!string.IsNullOrEmpty(context.Request["Grouping"]))
            {
                strWhere += " and  Grouping =  '" + context.Request["Grouping"].Trim() + "' ";
            }

            if (!string.IsNullOrEmpty(context.Request["ObjName"]))
            {
                strWhere += " and  objID IN(SELECT ID FROM OObject WHERE ObjName like  '%" + context.Request["ObjName"].Trim() + "%') ";
            }

            if (!string.IsNullOrEmpty(context.Request["ObjReMID"]))
            {
                strWhere += " and  objID IN(SELECT ID FROM OObject WHERE ReObjMID =  '" + context.Request["ObjReMID"].Trim() + "') ";
            }

            if (!string.IsNullOrEmpty(context.Request["JGWhere"]) && !string.IsNullOrEmpty(context.Request["JGType"]) && !string.IsNullOrEmpty(context.Request["JGValue"]))
            {
                strWhere += " and " + context.Request["JGWhere"] + context.Request["JGType"] + context.Request["JGValue"] + " ";
            }

            //如果是单位部门的话 能管理自己发布的项目
            if (!TModel.Role.IsAdmin)
            {
                strWhere += " and  objID IN(SELECT ID FROM OObject WHERE ReObjMID='" + TModel.MID + "') ";
            }

            if (!string.IsNullOrEmpty(context.Request["IsSState"]))
            {
                strWhere += " and  objID IN(SELECT ID FROM OObject WHERE SState='" + context.Request["IsSState"] + "') ";
            }

            int count;
            List <Model.ObjSub> ListO = BLL.ObjSub.GetList(strWhere, pageIndex, pageSize, out count);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ListO.Count; i++)
            {
                Model.OObject      obj = BLL.OObject.GetModel(ListO[i].ObjID);
                Model.ObjUserApply oua = BLL.ObjUserApply.GetModel(ListO[i].SpInt);
                Model.ObjUser      ou  = BLL.ObjUser.GetModel(ListO[i].URID);

                //Model.ObjSubUser objsub = BLL.ObjSubUser.GetModelList(" SpInt=" + obj.ID + " and MID='" + TModel.MID + "' ").FirstOrDefault();
                sb.Append(ListO[i].ID + "~");
                sb.Append((i + 1) + (pageIndex - 1) * pageSize + "~");
                sb.Append(obj.ObjOID + "~");
                sb.Append(obj.ObjName + "~");
                sb.Append(oua.DanWeiName + "~");
                sb.Append(oua.CreateDate + "~");
                sb.Append(ListO[i].Spare + "~");
                sb.Append((ou.USState.ToString().Replace("0", "待审核").Replace("2", "打回").Replace("3", "审核通过")) + "~");
                sb.Append((ListO[i].ResultOne) + "~");
                sb.Append((ListO[i].ResultTwo) + "~");
                sb.Append((ListO[i].ResultAvg) + "~");
                sb.Append((ListO[i].Serial) + "~");
                sb.Append((ListO[i].Grouping) + "~");
                sb.Append((ListO[i].ZB) + "~");
                sb.Append((ListO[i].Q1) + "~");
                sb.Append((ListO[i].Q2) + "~");
                sb.Append((ListO[i].IRQ) + "~");
                sb.Append((ListO[i].M) + "~");
                sb.Append((ListO[i].NIRQ) + "~");
                sb.Append((ListO[i].ResultStatus) + "~");

                sb.Append((ListO[i].SHInt.ToString().Replace("0", "待审核").Replace("2", "不合格").Replace("1", "合格")) + "~");
                if (ListO[i].SHInt == 0)
                {
                    sb.Append("<div  class=\"pay btn btn-success\" onclick=\"SHChange('" + ListO[i].ID + "')\">合格</div>");
                    sb.Append("<div  class=\"pay btn btn-warning\" onclick=\"DHChange('" + ListO[i].ID + "')\">不合格</div>");
                }

                sb.Append("<div  class=\"pay btn btn-warning\" onclick=\"subModify('" + ListO[i].ID + "')\">修改</div>");
                sb.Append("≌");
            }
            var info = new { PageData = Traditionalized(sb), TotalCount = count };

            //var json = new { PageData = sb.ToString(), TotalCount = count };匿名类
            context.Response.Write(JavaScriptConvert.SerializeObject(info));
        }