Beispiel #1
0
        // GET: api/Users
        public IHttpActionResult GetUser(PublicModel publicModel)
        {
            SHDocVw.InternetExplorer ie = new SHDocVw.InternetExplorer();

            ie.Navigate("https://login.taobao.com/member/login.jhtml?redirectURL=https%3A%2F%2Fai.taobao.com%2F%3Fpid%3Dmm_112599953_14918079_77950911");
            ie.Visible = true;

            IHTMLDocument3 doc = (IHTMLDocument3)ie.Document;

            doc.getElementById("TPL_username_1").innerText = "肖梓璇35834616";
            doc.getElementById("TPL_password_1").innerText = "xiao4563515";
            doc.getElementById("J_SubmitStatic").click();


            ie.Navigate("http://i.taobao.com/my_taobao.htm");
            ie.Visible = true;

            ie.Navigate(" https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm?spm=a1z02.1.972272805.d4919663.73d2782d6TTeTm&action=itemlist/BoughtQueryAction&event_submit_do_query=1&tabCode=waitRate");
            ie.Visible = true;
            doc.getElementById("rateOrder").click();
            var ss = doc.documentElement.outerText = "1111";


            var userList = db.User.ToList();
            var data     = Newtonsoft.Json.JsonConvert.SerializeObject(userList);

            return(Json(data));
        }
Beispiel #2
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Model.T_UsersInfo_MDL model = new DigiPower.Onlinecol.Standard.Model.T_UsersInfo_MDL();
            if (ViewState["model"] != null)
            {
                model = (Model.T_UsersInfo_MDL)ViewState["model"];
            }

            object obj = Comm.GetValueToObject(model, this.tbl);

            if (obj != null)
            {
                Model.T_UsersInfo_MDL Newmodel = (Model.T_UsersInfo_MDL)obj;
                Newmodel.Passwd     = DESEncrypt.Encrypt(Passwd.Text);                             //密码加密
                Newmodel.Createdate = System.DateTime.Now;                                         //创建时间或最后修改时间
                Newmodel.Createdby  = Common.Session.GetSession("UserName");                       //创建者或最后修改者
                Newmodel.UserType   = SystemSet.EumUserType.CompanyUser.ToString();                //默认为公司用户

                switch ((CommonEnum.PageState)ViewState["ps"])
                {
                case CommonEnum.PageState.EDIT:
                    Model.T_UsersInfo_MDL tempObj = userBLL.GetModel(Newmodel.UserID);
                    userBLL.Update(Newmodel);

                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_UsersInfo;key=", tempObj.UserID,
                                                                                                ";UserType=", tempObj.UserType, ";CompanyID=", tempObj.CompanyID, ";UserName="******";LoginName=", tempObj.LoginName, ";UserType=", tempObj.UserType));

                    break;
                }
            }
            Common.MessageBox.CloseLayerOpenWeb(this.Page);
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ProjectType = DNTRequest.GetQueryString("Archive_Form");
            if (!IsPostBack)
            {
                ddlProjectType.DataBindEx(true);
                ddlProjectType.SelectValue = ProjectType;
                ddlProjectType.Enabled     = false;
                ddlChargeUserID.BindDataByCompanyID("", true, SystemSet._ROLECODE_CHARGEUSER,
                                                    Common.Session.GetSession("OLD_AREA_CODE"));

                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("ddlProjectType")))
                {
                    ddlProjectType.SelectValue = Server.UrlDecode(DNTRequest.GetQueryString("ddlProjectType"));
                }
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("kgsj1")))
                {
                    kgsj1.Text = Server.UrlDecode(DNTRequest.GetQueryString("kgsj1"));
                }
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("kgsj2")))
                {
                    kgsj2.Text = Server.UrlDecode(DNTRequest.GetQueryString("kgsj2"));
                }
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("jgsj1")))
                {
                    jgsj1.Text = Server.UrlDecode(DNTRequest.GetQueryString("jgsj1"));
                }
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("jgsj2")))
                {
                    jgsj2.Text = Server.UrlDecode(DNTRequest.GetQueryString("jgsj2"));
                }
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("txtGcbm")))
                {
                    txtGcbm.Text = Server.UrlDecode(DNTRequest.GetQueryString("txtGcbm"));
                }
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("txtGcmc")))
                {
                    txtGcmc.Text = Server.UrlDecode(DNTRequest.GetQueryString("txtGcmc"));
                }
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("txtGcdd")))
                {
                    txtGcdd.Text = Server.UrlDecode(DNTRequest.GetQueryString("txtGcdd"));
                }
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("ddlChargeUserID")))
                {
                    ddlChargeUserID.SelectValue = Server.UrlDecode(DNTRequest.GetQueryString("ddlChargeUserID"));
                }
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("txtghxkzh")))
                {
                    txtghxkzh.Text = Server.UrlDecode(DNTRequest.GetQueryString("txtghxkzh"));
                }
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("txtsgxkzh")))
                {
                    txtsgxkzh.Text = Server.UrlDecode(DNTRequest.GetQueryString("txtsgxkzh"));
                }
                ViewState["workFlowID"] = PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.IMPORT_TO.ToString());

                BindGridView(AspNetPager.CurrentPageIndex);
            }
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            BLL.T_Module_BLL   bll      = new DigiPower.Onlinecol.Standard.BLL.T_Module_BLL();
            Model.T_Module_MDL Newmodel = bll.GetModel(Common.ConvertEx.ToInt(ID));
            if (Newmodel == null)
            {
                Newmodel = new DigiPower.Onlinecol.Standard.Model.T_Module_MDL();
            }
            Newmodel             = (Model.T_Module_MDL)Comm.GetValueToObject(Newmodel, this.tbl);
            Newmodel.RightListID = chkMenuRight.getSelectValue;
            if (Newmodel != null)
            {
                switch ((CommonEnum.PageState)ViewState["ps"])
                {
                case CommonEnum.PageState.ADD:
                    int moduleID = bll.Add(Newmodel);
                    PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_Module;key=", moduleID,
                                                                                                ";ModuleName=", Newmodel.ModuleName, ";BH=", Newmodel.BH));
                    break;

                case CommonEnum.PageState.EDIT:
                    bll.Update(Newmodel);
                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_Module;key=", Newmodel.ModuleID,
                                                                                                ";ModuleName=", Newmodel.ModuleName, ";BH=", Newmodel.BH));
                    break;
                }
            }
            Common.MessageBox.CloseLayerOpenWeb(this.Page);
        }
Beispiel #5
0
        public void DeleteFile(string archiveListCellRptID, string singleProjectID)
        {
            T_EFile_MDL model = new T_EFile_MDL();

            model = eFileBLL.GetModel(Convert.ToInt32(archiveListCellRptID));
            if (model != null)
            {
                string filePath = string.Concat(model.RootPath, singleProjectID, "\\ODOC\\", model.FilePath);

                if (filePath != "" && System.IO.File.Exists(filePath))
                {
                    System.IO.File.Delete(filePath);
                }
                //删除电子文件记录
                eFileBLL.Delete(Convert.ToInt32(archiveListCellRptID));
                PublicModel.writeLog(SystemSet.EumLogType.DelData.ToString(), string.Concat("T_EFile;key=", model.ArchiveListCellRptID,
                                                                                            ";SingleProjectID=", SingleProjectID, ";FileListID=", model.FileListID, ";Title=", model.Title));

                //Leo 更新文件夹,晚上重新生产一次
                T_FileList_MDL fileListMDL = fileListBLL.GetModel(model.FileListID);
                if (fileListMDL != null)
                {
                    fileListMDL.CONVERT_FLAG = false;
                    fileListMDL.Version      = PublicModel.getFileVersion(fileListMDL.SingleProjectID.ToString());
                    fileListBLL.Update(fileListMDL);
                }
            }
        }
Beispiel #6
0
        public string DeleteCompany(string CompanyID)
        {
            string flag = SystemSet._RETURN_SUCCESS_VALUE;

            try {
                T_Company_MDL companyMDL = compBLL.GetModel(ConvertEx.ToInt(CompanyID));
                if (companyMDL != null)
                {
                    T_SystemInfo_BLL systemInfoBLL = new T_SystemInfo_BLL();
                    if (companyMDL != null && companymdl.CompanyType != SystemSet._JSCOMPANYINFO)  //只删除监理和施工
                    {
                        compBLL.DeleteCompanyOther(CompanyID);

                        PublicModel.writeLog(SystemSet.EumLogType.DelData.ToString(), string.Concat("T_Company;key=", companyMDL.CompanyID,
                                                                                                    ";CompanyCode=", companyMDL.CompanyCode, ";CompanyType=", companyMDL.CompanyType,
                                                                                                    ";CompanyName=", companyMDL.CompanyName, ";删除公司及其关联表信息"));
                    }
                    else
                    {
                        flag = SystemSet._RETURN_FAILURE_VALUE + ":建设单位不能被删除!";
                    }
                }
            } catch (Exception ex) {
                flag = SystemSet._RETURN_FAILURE_VALUE + ex.Message;
                Common.LogUtil.Debug(this, "删除公司", ex);
            }
            return(flag);
        }
        protected void rpData_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                DataRowView view          = e.Item.DataItem as DataRowView;
                Literal     ltCheckStatus = e.Item.FindControl("ltCheckStatus") as Literal;
                Literal     ltRemark      = e.Item.FindControl("ltRemark") as Literal;

                Hashtable ht = new Hashtable();
                ht.Add("SingleProjectID", singleProjectID);
                ht.Add("WorkFlowID", workFlowID);
                ht.Add("ArchiveID", view["ArchiveID"].ToString());

                List <T_WorkFlowDoResult_MDL> list = doResultBLL.GetArchiveLastChecResultList(ht);   //获取的是最后一次的审核信息,根据流程ID
                if (list.Count > 0)
                {
                    string remark     = list[0].DoRemark.ToString();
                    bool   blDoResult = ConvertEx.ToBool(list[0].DoResult);

                    ltCheckStatus.Text = PublicModel.GetImageforStatus(blDoResult);
                    ltRemark.Text      = "<a style=\"color: black;cursor:pointer;\"  onclick=\"Common.fnLayerTips('" + remark + "',this)\"> ";
                    ltRemark.Text     += ((remark.Length > 3) ? remark.Substring(0, 3) + "..." : remark) + "</a>";

                    HtmlTableRow col = (HtmlTableRow)e.Item.FindControl("r1");
                    if (blDoResult)
                    {
                        col.BgColor = "green";
                    }
                    else
                    {
                        col.BgColor = "red";
                    }
                }
            }
        }
Beispiel #8
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try {
                T_SingleProject_MDL singleProMDL = singleProBLL.GetModel(DNTRequest.GetQueryInt("SingleProjectID", 0));
                if (singleProMDL != null)
                {
                    //将指导人员指导环节的所有 [受理]全部 做,这样,除了管理员和受理人员外,其他人都看不到流程下的工程
                    T_WorkFlowDefine_BLL         workFlowDefineBLL = new T_WorkFlowDefine_BLL();
                    IList <T_WorkFlowDefine_MDL> workFlowDefineLT  = workFlowDefineBLL.GetModelList(" SingleProjectID=" +
                                                                                                    singleProMDL.SingleProjectID + " and WorkFlowID in(" + SystemSet._DEFAULT_RECV_WORKFLOWID + ") ");
                    if (workFlowDefineLT != null && workFlowDefineLT.Count > 0)
                    {
                        foreach (T_WorkFlowDefine_MDL wkdMDL in workFlowDefineLT)
                        {
                            wkdMDL.SubmitStatus = 2;//受理完成状态
                            wkdMDL.RecvUserID   = Common.ConvertEx.ToInt(ddlNewUser.SelectValue);
                            wkdMDL.RecvDateTime = DateTime.Now;
                            workFlowDefineBLL.Update(wkdMDL);
                        }
                    }
                    singleProMDL.ChargeUserID = Common.ConvertEx.ToInt(ddlNewUser.SelectValue);
                    singleProBLL.Update(singleProMDL);
                    Common.LogUtil.Info(this, "变更业务指导人员:" + singleProMDL.gcbm + "-------" +
                                        ddlOldUser.SelectText + "-------" + ddlNewUser.SelectText);

                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(),
                                         string.Concat("T_SingleProject_MDL;keyList=", singleProMDL.SingleProjectID, ";gcbm=", singleProMDL.gcbm,
                                                       ";gcmc=", singleProMDL.gcmc, ";UserName="******"UserName"), ";UserID=",
                                                       Common.Session.GetSession("UserID"), "变更业务指导人员(", ddlOldUser.SelectText, "--->", ddlNewUser.SelectText, ")"));
                }
                Common.MessageBox.CloseLayerOpenWeb(this.Page);
            } catch (Exception ex) {
                Common.LogUtil.Debug(this, "变更业务指导人员", ex);
            }
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            T_WorkFlow_MDL model = new T_WorkFlow_MDL();

            if (ViewState["model"] != null)
            {
                model = (T_WorkFlow_MDL)ViewState["model"];
            }

            object obj = Comm.GetValueToObject(model, this.tbl);

            if (obj != null)
            {
                T_WorkFlow_MDL Newmodel = (T_WorkFlow_MDL)obj;
                Newmodel.RightListID = chkMenuRight.getSelectValue;
                switch ((CommonEnum.PageState)ViewState["ps"])
                {
                case CommonEnum.PageState.ADD:
                    int workFlowID = workFlowBLL.Add(Newmodel);

                    PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_WorkFlow;key=", workFlowID,
                                                                                                ";CompanyID=", Newmodel.CompanyID, ";WorkFlowCode=", Newmodel.WorkFlowCode, ";WorkFlowName=", Newmodel.WorkFlowName));
                    break;

                case CommonEnum.PageState.EDIT:
                    T_WorkFlow_MDL tempObj = workFlowBLL.GetModel(Newmodel.WorkFlowID);
                    workFlowBLL.Update(Newmodel);

                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_WorkFlow;key=", Newmodel.WorkFlowID,
                                                                                                ";CompanyID=", Newmodel.CompanyID, ";WorkFlowCode=", Newmodel.WorkFlowCode, ";WorkFlowName=", Newmodel.WorkFlowName));
                    break;
                }
            }
            Common.MessageBox.CloseLayerOpenWeb(this.Page);
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (ViewState["userMDL"] != null)
            {
                T_UsersInfo_MDL userMDL = ViewState["userMDL"] as T_UsersInfo_MDL;

                userMDL.UserName = UserName.Text;
                userMDL.Mobile   = Mobile.Text;
                userMDL.Fax      = Fax.Text;
                userMDL.Tel      = Tel.Text;
                userMDL.Passwd   = DESEncrypt.Encrypt(newPasswd2.Text);
                userinfoBLL.Update(userMDL);

                PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat(" T_UsersInfo;key=", userMDL.UserID,
                                                                                            ";UserName="******";LoginName=", userMDL.LoginName, ";ChangePassword.aspx密码重置"));


                if (ViewState["companyMDL"] != null)
                {
                    T_Company_MDL companyMDL = ViewState["companyMDL"] as T_Company_MDL;
                    companyMDL.CompanyName = CompanyName.Text.Trim();
                    companyBLL.Update(companyMDL);

                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat(" T_Company_MDL;key=", companyMDL.CompanyID,
                                                                                                ";CompanyName=", companyMDL.CompanyName, ";ChangePassword.aspx管理员更新档案馆名称"));
                }
                Common.MessageBox.FnLayerAlert(this.Page, "保存成功,新密码重新登录才有效!");
            }
        }
Beispiel #11
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            T_FileListTmp_MDL model = new T_FileListTmp_MDL();

            if (ViewState["model"] != null)
            {
                model = (Model.T_FileListTmp_MDL)ViewState["model"];
            }
            object obj = Comm.GetValueToObject(model, this.tbl);

            if (obj != null)
            {
                Model.T_FileListTmp_MDL Newmodel = (Model.T_FileListTmp_MDL)obj;
                switch ((CommonEnum.PageState)ViewState["ps"])
                {
                case CommonEnum.PageState.ADD:
                    ID = fileTmpBLL.Add(Newmodel).ToString();

                    PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_FileListTmp;key=", ID,
                                                                                                ";archive_form_no=", Newmodel.archive_form_no, ";bh=", Newmodel.bh, ";title=", Newmodel.title));
                    break;

                case CommonEnum.PageState.EDIT: {
                    Newmodel.recid = Convert.ToInt32(ID);
                    fileTmpBLL.Update(Newmodel);

                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_FileListTmp;key=", Newmodel.recid,
                                                                                                ";archive_form_no=", Newmodel.archive_form_no, ";bh=", Newmodel.bh, ";title=", Newmodel.title));
                }
                break;
                }
            }
            Common.MessageBox.CloseLayerOpenWeb(this.Page);
        }
Beispiel #12
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            T_Construction_Project_BLL projectbll = new T_Construction_Project_BLL();
            T_Construction_Project_MDL obj        = new T_Construction_Project_MDL();

            obj = ctrlConstructionBaseInfo1.GetModule(Common.ConvertEx.ToInt(Common.DNTRequest.GetQueryString("ID")));
            //object obj = Comm.GetValueToObject(tmdl1, table1);
            int SingleProjectID = 0;

            if (obj != null)
            {
                T_Construction_Project_MDL newprojectmdl = (T_Construction_Project_MDL)obj;
                newprojectmdl.jgrq = DateTime.Now;
                if (((CommonEnum.PageState)ViewState["ps"]) == CommonEnum.PageState.ADD)
                {
                    newprojectmdl.CompanyID = Common.ConvertEx.ToInt(Common.Session.GetSession("CompanyID"));

                    //Leo 新增时,需要自动产生项目号
                    T_Other_BLL otherBLL = new T_Other_BLL();
                    newprojectmdl.xmh = otherBLL.GetNewProjectID();

                    SingleProjectID = projectbll.Add(newprojectmdl);
                    PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(),
                                         string.Concat("T_Construction_Project;key=", SingleProjectID, ";xmmc=", newprojectmdl.xmmc));
                }
                else
                {
                    projectbll.Update(newprojectmdl);
                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(),
                                         string.Concat("T_Construction_Project;key=", newprojectmdl.ConstructionProjectID, ";xmmc=", newprojectmdl.xmmc));
                }
            }
            Common.MessageBox.CloseLayerOpenWeb(this.Page);
        }
Beispiel #13
0
        public ActionResult Public(string u, int cate = 0)
        {
            var user  = GetSnsUser(u);
            var model = new PublicModel(user, cate);

            return(View(model));
        }
        public string SaveSingleProjectPoint(string singleProjectID, string orderIndex, string pointID, string x, string y)
        {
            string flag = SystemSet._RETURN_SUCCESS_VALUE;

            try {
                T_SingleProject_Point_MDL pointMDL = new T_SingleProject_Point_MDL();
                if (ConvertEx.ToInt(pointID) > 0)
                {
                    pointMDL = pointBLL.GetModel(ConvertEx.ToInt(pointID));
                }

                pointMDL.SingleProjectID = ConvertEx.ToInt(singleProjectID);
                pointMDL.X          = x;
                pointMDL.Y          = y;
                pointMDL.OrderIndex = ConvertEx.ToInt(orderIndex);

                if (ConvertEx.ToInt(pointID) > 0)
                {
                    pointBLL.Update(pointMDL);
                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_SingleProject_Point;key=", pointMDL.PointID,
                                                                                                ";SingleProjectID=", pointMDL.SingleProjectID, ";修改工程坐标"));
                }
                else
                {
                    int tpPointID = pointBLL.Add(pointMDL);
                    PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_SingleProject_Point;key=", tpPointID,
                                                                                                ";SingleProjectID=", pointMDL.SingleProjectID, ";新增工程坐标"));
                }
            } catch (Exception ex) {
                flag = SystemSet._RETURN_FAILURE_VALUE + ex.Message;
                Common.LogUtil.Debug(this, "保存工程坐标", ex);
            }
            return(flag);
        }
Beispiel #15
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType     = "text/plain";
            context.Request.ContentEncoding  = Encoding.GetEncoding("UTF-8");
            context.Response.ContentEncoding = Encoding.GetEncoding("UTF-8");
            context.Response.Charset         = "utf-8";
            string fileListID      = Common.DNTRequest.GetQueryString("FileID");            //文件ID
            string singleProjectID = Common.DNTRequest.GetQueryString("SingleProjectID");   //工程ID

            HttpPostedFile file       = context.Request.Files["Filedata"];
            string         uploadPath = string.Concat(Common.Common.EFileStartPath, singleProjectID, "\\ODOC\\");

            if (file != null)
            {
                string fileName = PublicModel.UpLoadImage1(file, uploadPath);
                if (fileName.IndexOf("Error") < 0)//表示文件上传成功
                {
                    UpdateFile(singleProjectID, fileListID, fileName, file.FileName);
                }

                //下面这句代码缺少的话,上传成功后上传队列的显示不会自动消失
                context.Response.Write("1");
            }
            else
            {
                context.Response.Write("0");
            }
        }
Beispiel #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Ajax.Utility.RegisterTypeForAjax(typeof(RoleAdd));
            MyAddInit();
            CTRL_AREA.MySelectChange += new DigiPower.Onlinecol.Standard.Web.CommonCtrl.ctrlDropDownArea.SelectChange(CompanySelectChange);
            if (!this.IsPostBack)
            {
                RoleType.DataValueField = "SystemInfoCode";
                RoleType.DataBindEx();

                if (PublicModel.isSuperAdmin())
                {
                    CTRL_AREA.BindDblArea(true, "");
                }
                else
                {
                    CTRL_AREA.BindDblArea(true, "AREA_CODE='" + Common.Session.GetSession("AREA_CODE") + "'");
                }

                if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.VIEW)
                {
                    btnSave.Visible = false;
                }

                CompanySelectChange();
                BindPage(ID);
            }
        }
Beispiel #17
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            T_Role_MDL model = new T_Role_MDL();

            if (ViewState["model"] != null)
            {
                model = (Model.T_Role_MDL)ViewState["model"];
            }

            object obj = Comm.GetValueToObject(model, this.tbl);

            if (obj != null)
            {
                T_Role_MDL Newmodel = (T_Role_MDL)obj;
                switch ((CommonEnum.PageState)ViewState["ps"])
                {
                case CommonEnum.PageState.ADD:
                    int roleID = roleBLL.Add(Newmodel);
                    PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_Role;key=", roleID,
                                                                                                ";RoleCode=", Newmodel.RoleCode, ";RoleName=", Newmodel.RoleName));
                    break;

                case CommonEnum.PageState.EDIT:
                    roleBLL.Update(Newmodel);
                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_Role;key=", Newmodel.RoleID,
                                                                                                ";RoleCode=", Newmodel.RoleCode, ";RoleName=", Newmodel.RoleName));
                    break;
                }
            }
            Common.MessageBox.CloseLayerOpenWeb(this.Page);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Ajax.Utility.RegisterTypeForAjax(typeof(ChangePassword));
            if (Common.Session.GetSession("UserID") == "")
            {
                Response.Redirect("/UserLoginGather.aspx");
            }
            if (!this.IsPostBack)
            {
                T_UsersInfo_MDL userMDL = userinfoBLL.GetModel(ConvertEx.ToInt(Common.Session.GetSession("UserID")));
                if (userMDL != null)
                {
                    UserName.Text  = userMDL.UserName;
                    Mobile.Text    = userMDL.Mobile;
                    Fax.Text       = userMDL.Fax;
                    Tel.Text       = userMDL.Tel;
                    LoginName.Text = userMDL.LoginName;

                    if (!PublicModel.isSuperAdmin())
                    {
                        CompanyName.readOnly = true;
                    }

                    T_Company_MDL companyMDL = new T_Company_BLL().GetModel(userMDL.CompanyID);
                    if (companyMDL != null)
                    {
                        ViewState["companyMDL"] = companyMDL;
                        CompanyName.Text        = companyMDL.CompanyName;
                    }

                    ViewState["userMDL"] = userMDL;
                }
            }
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Model.T_Area_MDL model = new DigiPower.Onlinecol.Standard.Model.T_Area_MDL();
            if (ViewState["model"] != null)
            {
                model = (Model.T_Area_MDL)ViewState["model"];
            }
            object obj = Comm.GetValueToObject(model, this.tbl);

            if (obj != null)
            {
                Model.T_Area_MDL Newmodel = (Model.T_Area_MDL)obj;

                switch ((CommonEnum.PageState)ViewState["ps"])
                {
                case CommonEnum.PageState.ADD: {
                    int areaID = areaBLL.Add(Newmodel);
                    PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_Area;key=", areaID,
                                                                                                ";area_code=", Newmodel.area_code, ";area_name=", Newmodel.area_name));
                    break;
                }

                case CommonEnum.PageState.EDIT: {
                    Newmodel.AreaID = Convert.ToInt32(ID);
                    areaBLL.Update(Newmodel);

                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_Area;key=", Newmodel.AreaID,
                                                                                                ";area_code=", Newmodel.area_code, ";area_name=", Newmodel.area_name));
                }
                break;
                }
            }
            Common.MessageBox.CloseLayerOpenWeb(this.Page);
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="pageIndex"></param>
        public void BindGrid(int pageIndex)
        {
            //从窗口接收开始,都是馆里人员操作,不用考虑建设单位等身份
            string strWhere = " AND A.SingleProjectID=" + Common.DNTRequest.GetQueryString("SingleProjectID");

            if (PublicModel.isSuperAdmin())
            {//管理员管理员获取所有工程
                strWhere += " AND D.AREA_CODE LIKE '" + Common.Session.GetSession("AREA_CODE") + "%'";
            }
            else if (PublicModel.isArchiveUser())
            {//档案馆用户看自己的
                strWhere += " AND D.AREA_CODE LIKE '" + Common.Session.GetSession("OLD_AREA_CODE") + "%'";
            }

            if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0)
            {
                pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex"));
                ViewState["CurrentPageIndex"] = pageIndex;
            }
            else
            {
                pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]);
            }

            DataTable dt = trBll.GetListPaging(strWhere, pageSize, pageIndex, out itemCount, null);;

            AspNetPager.AlwaysShow = true;
            AspNetPager.PageSize   = pageSize;

            AspNetPager.RecordCount      = itemCount;
            AspNetPager.CurrentPageIndex = pageIndex;

            rpData.DataSource = dt;
            rpData.DataBind();
        }
        /// <summary>
        /// 组卷
        /// </summary>
        /// <returns></returns>
        private int CreateAj()
        {
            T_Archive_MDL model = new T_Archive_MDL();

            model.ajtm            = ajtm.Text;
            model.bzdw            = bzdw.Text;
            model.lrr             = lrr.Text;
            model.lrsj            = ConvertEx.ToDate(lrsj.Text);
            model.ajlx            = ajlx.SelectValue;
            model.BoxType         = boxType.SelectValue;
            model.qssj            = DateTime.Now;
            model.zzsj            = DateTime.Now;
            model.SingleProjectID = Common.ConvertEx.ToInt(singleProjectID);
            model.xh = archiveBLL.getMaxArchiveXhBySingleProjectID(singleProjectID) + 10;;

            model.note = note.Text;
            model.bgqx = SystemSet._DEFAULT_ARCHIVE_BGQX;
            model.mj   = SystemSet._DEFAULT_ARCHIVE_MJ;

            int archiveID = archiveBLL.Add(model);

            PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_Archive;ArchiveID=", archiveID,
                                                                                        ";SingleProjectID=", model.SingleProjectID, ";ajtm=", model.ajtm, ";xh=", model.xh, ";案卷补录-组卷"));

            return(archiveID);
        }
Beispiel #22
0
        /// <summary>
        /// 列表数据绑定
        /// </summary>
        /// <param name="pageIndex"></param>
        private void BindGridView(int pageIndex)
        {
            string sqlWhere = " b.CompanyType !=" + SystemSet._ARCHIVE;

            if (!String.IsNullOrWhiteSpace(txtLoginName.Text.Trim()))
            {
                sqlWhere += " And a.LoginName like '%" + txtLoginName.Text.Trim() + "%' ";
            }
            if (!String.IsNullOrWhiteSpace(txtUserName.Text.Trim()))
            {
                sqlWhere += " And a.UserName like '%" + txtUserName.Text.Trim() + "%' ";
            }
            if (!String.IsNullOrWhiteSpace(txtCompanyName.Text.Trim()))
            {
                sqlWhere += " And b.CompanyName like '%" + txtCompanyName.Text.Trim() + "%' ";
            }
            if (!String.IsNullOrWhiteSpace(txtGcmc.Text.Trim()))
            {
                sqlWhere += " And d.gcmc like '%" + txtGcmc.Text.Trim() + "%' ";
            }
            if (!String.IsNullOrWhiteSpace(txtGcdd.Text.Trim()))
            {
                sqlWhere += " And d.gcdd like '%" + txtGcdd.Text.Trim() + "%' ";
            }
            if (ddlUserType.SelectedValue != "0")
            {
                sqlWhere += " And lower(a.UserType)='" + ddlUserType.SelectedValue.Trim().ToLower() + "' ";
            }

            if (PublicModel.isSuperAdmin())  //超级管理员
            {
                sqlWhere += " And b.Area_Code like '" + Common.Session.GetSession("OLD_AREA_CODE") + "%' ";
            }
            else if (PublicModel.isArchiveUser())   //馆里用户
            {
                sqlWhere += " And b.Area_Code like '" + Common.Session.GetSession("AREA_CODE") + "%' ";
            }

            if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0)
            {
                pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex"));
                ViewState["CurrentPageIndex"] = pageIndex;
            }
            else
            {
                pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]);
            }

            DataTable dt = userBLL.GetCompanyUserList(sqlWhere, pageSize, pageIndex, out itemCount);

            AspNetPager.AlwaysShow = true;
            AspNetPager.PageSize   = pageSize;

            AspNetPager.RecordCount      = itemCount;
            AspNetPager.CurrentPageIndex = pageIndex;

            rpData.DataSource = dt;
            rpData.DataBind();
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="pageIndex"></param>
        public void BindGrid(int pageIndex)
        {
            //工程状态必须走到了 整理接收 且没有入库 !=3722 才可以做补卷管理
            string strWhere = " AND D.WorkFlow_DoStatus >=(select WorkFlowID from T_WorkFlow where LOWER(WorkFlowCode)='" +
                              SystemSet.EumWorkFlowCode.WINRECV.ToString().ToLower() + "') and  d.Status!=3722 ";

            if (PublicModel.isSuperAdmin())  //管理员管理员获取所有工程
            {
                strWhere += " AND D.AREA_CODE LIKE '" + Common.Session.GetSession("AREA_CODE") + "%'";
            }
            else if (PublicModel.isArchiveUser())    //档案馆用户看自己的
            {
                strWhere += " AND D.AREA_CODE LIKE '" + Common.Session.GetSession("OLD_AREA_CODE") + "%'";
            }
            else
            {
                if (PublicModel.isLeader())     //建设单位只看到自己
                {
                    strWhere += " AND A.SingleProjectID in (select SingleProjectID from T_SingleProject  A,(select distinct ConstructionProjectID from T_Construction_Project ";
                    strWhere += " where CompanyID=" + Common.Session.GetSession("CompanyID") + ") B where A.ConstructionProjectID=B.ConstructionProjectID)";
                }
            }

            if (txtgcmc.Text.Trim().Length > 0)
            {
                strWhere += " AND D.gcmc LIKE '%" + txtgcmc.Text.Trim() + "%'";
            }
            if (txtgcbm.Text.Trim().Length > 0)
            {
                strWhere += " AND D.gcbm LIKE '%" + txtgcbm.Text + "%'";
            }
            if (txtajtm.Text.Trim().Length > 0)
            {
                strWhere += " AND A.ajtm like '%" + txtajtm.Text.Trim() + "%' ";
            }

            if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0)
            {
                pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex"));
                ViewState["CurrentPageIndex"] = pageIndex;
            }
            else
            {
                pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]);
            }
            DataTable dt = archiveBLL.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);;

            AspNetPager.AlwaysShow = true;
            AspNetPager.PageSize   = pageSize;

            AspNetPager.RecordCount      = itemCount;
            AspNetPager.CurrentPageIndex = pageIndex;

            rpData.DataSource = dt;
            rpData.DataBind();
        }
Beispiel #24
0
 /// <summary>
 /// 绑定用户类型
 /// </summary>
 private void DataBindExUserType()
 {
     foreach (var dic in Enum.GetNames(typeof(SystemSet.EumUserType)))
     {
         ddlUserType.Items.Insert(0, new ListItem(PublicModel.GetEnumDescription((SystemSet.EumUserType)Enum.Parse(typeof(SystemSet.EumUserType), dic)), dic.ToLower()));
     }
     ddlUserType.Items.Insert(0, new ListItem("--请选择--", "0"));
     ddlUserType.SelectedValue = DNTRequest.GetQueryString("UserType").ToLower();
     ddlUserType.Enabled       = false;
 }
 public bool CheckSingleWorkFlowStatus(string workFlowID, string workFlowCode)
 {
     if (ConvertEx.ToInt(workFlowID) >= PublicModel.getWorkFlowIdByWorkFlowCode(workFlowCode))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #26
0
    public LootBoxModel()
    {
        if (Instance != null)
        {
            Debug.LogWarning("Replacing the current model!");
        }
        Instance = this;

        List <Units> unitTypes = Enum.GetValues(typeof(Units)).Cast <Units>().ToList();

        Resources = new Dictionary <Units, Resource>();
        for (int i = 0; i < unitTypes.Count; i++)
        {
            Units type = unitTypes[i];
            Resources.Add(type, new Resource(type, 0));
        }

        UpgradeManager          = new UpgradeManager(this);
        UpgradeManager.IsActive = true;
        Time = new TimeModel(this);

        Life          = new LifeModel(this);
        Life.IsActive = true;

        Job          = new JobModel(this);
        Job.IsActive = false;

        MacGuffinQuest          = new MacGuffinQuest(this);
        MacGuffinQuest.IsActive = false;

        Influencer          = new InfluencerModel(this);
        Influencer.IsActive = false;

        Studio          = new StudioModel(this);
        Studio.IsActive = false;

        Public          = new PublicModel(this);
        Public.IsActive = false;

        SetInitialState();

#if DEBUG
        if (UnlockAllViews)
        {
            Life.IsActive           = true;
            UpgradeManager.IsActive = true;
            Job.IsActive            = true;
            MacGuffinQuest.IsActive = true;
            Influencer.IsActive     = true;
            Studio.IsActive         = true;
            Public.IsActive         = true;
        }
#endif
    }
 public bool DelRoleRight(string RoleID, string RoleRightType)
 {
     try {
         new T_Other_BLL().DelRoleRight(RoleID, RoleRightType);
         PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_RoleRight;RoleRightType=", RoleRightType,
                                                                                     ";RoleID=", RoleID, ";更改权限"));
         return(true);
     } catch (Exception ex) {
         Common.LogUtil.Debug(this, "删除权限失败", ex);
         return(false);
     }
 }
Beispiel #28
0
        /// <summary>
        /// 电子文件上传
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnUpLoad_Click(object sender, EventArgs e)
        {
            try {
                if (FileUpload1.HasFile)
                {
                    string odocFilePath = string.Concat(Common.Common.EFileStartPath, SingleProjectID, "\\ODOC\\");

                    if (!System.IO.Directory.Exists(Common.Common.EFileStartPath))
                    {
                        System.IO.Directory.CreateDirectory(Common.Common.EFileStartPath);
                    }

                    if (!System.IO.Directory.Exists(odocFilePath))
                    {
                        System.IO.Directory.CreateDirectory(odocFilePath);
                    }

                    string fileNewName = Guid.NewGuid().ToString() + FileUpload1.FileName.Substring(FileUpload1.FileName.LastIndexOf('.'));;

                    //电子文件存放全路径
                    string FileFullPath = odocFilePath + fileNewName;
                    FileUpload1.SaveAs(FileFullPath);  //保存原始文件

                    T_EFile_MDL model = new T_EFile_MDL();

                    model.PageCounts = 0;
                    model.FileListID = Common.ConvertEx.ToInt(FileListID);
                    model.FileType   = 1;
                    model.OrderIndex = GetEfileMaxOrderIndex(FileListID);
                    model.Title      = FileUpload1.FileName.Substring(0, FileUpload1.FileName.LastIndexOf('.'));
                    model.RootPath   = Common.Common.EFileStartPath;
                    model.FilePath   = fileNewName;

                    model.FileType     = 0;
                    model.Status_Text  = "上传成功,当晚批量计算页数!";
                    model.CREATE_DT    = System.DateTime.Now.ToShortDateString();
                    model.CONVERT_FLAG = false;
                    int ArchiveListCellRptID = efileBLL.Add(model);

                    //更新文件级转换标志,等批量转换晚上转
                    T_FileList_MDL fileListMDL = filelistBLL.GetModel(model.FileListID);
                    fileListMDL.CONVERT_FLAG = false;
                    fileListMDL.RootPath     = Common.Common.EFileStartPath;
                    filelistBLL.Update(fileListMDL);
                    BindGridView(AspNetPager.CurrentPageIndex);

                    PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_EFile;key=", ArchiveListCellRptID,
                                                                                                ";SingleProjectID=", fileListMDL.SingleProjectID, ";FileListID=", model.FileListID, ";Title=", model.Title, "'案卷补录"));
                }
            } catch (Exception ex) {
                Common.LogUtil.Debug(this, "补卷-电子文件上传错误", ex);
            }
        }
        /// <summary>
        /// 证书附件上传
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int singleProjectID = DNTRequest.GetQueryInt("SingleProjectID", 0);

            if (singleProjectID > 0)
            {
                HttpFileCollection uploadFiles  = HttpContext.Current.Request.Files;//获取所有客户端上传文件对象
                HttpPostedFile     userPostFile = null;

                if (uploadFiles.Count > 0)
                {
                    for (int i = 0; i < uploadFiles.Count; i++)
                    {
                        userPostFile = uploadFiles[i];//获取独立的文件对象
                        string fileName = Common.Common.SaveFile(Server.MapPath(savePath), userPostFile, "R");

                        if (fileName != "")
                        {
                            T_FileAttach_MDL mdl = new T_FileAttach_MDL();
                            mdl.AttachName  = fileName;
                            mdl.AttachPath  = savePath + fileName;
                            mdl.CreateDate  = DateTime.Now;
                            mdl.PriKeyValue = singleProjectID;
                            mdl.OrderIndex  = 0;
                            mdl.Flag        = "Company_Registration";

                            if (Hid_ghxkz.Value != "")
                            {
                                Hid_ghxkz.Value = "";
                                mdl.AttachCode  = SystemSet.EumProject_Credentials.ghxkz.ToString();
                                fileAttachBLL.DelFileAttach(singleProjectID.ToString(), mdl.AttachCode, mdl.Flag);
                            }
                            else if (Hid_sgxkz.Value != "")
                            {
                                Hid_sgxkz.Value = "";
                                mdl.AttachCode  = SystemSet.EumProject_Credentials.sgxkz.ToString();
                                fileAttachBLL.DelFileAttach(singleProjectID.ToString(), mdl.AttachCode, mdl.Flag);
                            }
                            else if (Hid_other.Value != "")
                            {
                                mdl.AttachCode = SystemSet.EumProject_Credentials.other.ToString();
                            }

                            int attachID = fileAttachBLL.Add(mdl);
                            PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_FileAttach;key=", attachID,
                                                                                                        ";SingleProjectID=", singleProjectID, ";AttachCode=", mdl.AttachCode, ";上传工程证书附件"));
                        }
                    }
                }
                Common.MessageBox.CloseLayerOpenWeb(this.Page);
            }
        }
        protected void BindGrid(int pageIndex)
        {
            if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0)
            {
                pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex"));
                ViewState["CurrentPageIndex"] = pageIndex;
            }
            else
            {
                pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]);
            }

            Hashtable ht = new Hashtable();

            ht.Add("CompanyType", DNTRequest.GetQueryString("CompanyType"));
            if (txtCompanyName.Text.Trim().Length > 0)
            {
                ht.Add("CompanyName", txtCompanyName.Text.Trim());
            }

            if (PublicModel.isSuperAdmin())   //超级管理员
            {
                ht.Add("Area_Code", Common.Session.GetSession("AREA_CODE"));
            }
            else if (PublicModel.isArchiveUser())    //档案馆用户看自己的
            {
                ht.Add("Area_Code", Common.Session.GetSession("OLD_AREA_CODE"));
            }
            else if (PublicModel.isLeader())      //建设单位
            {
                ht.Add("Area_Code", Common.Session.GetSession("OLD_AREA_CODE"));
                if (DNTRequest.GetQueryInt("CompanyType", 0) == SystemSet._JSCOMPANYINFO)
                {
                    ht.Add("CompanyID", Common.Session.GetSession("CompanyID"));
                }
            }
            else
            {
                ht.Add("CompanyID", Common.Session.GetSession("CompanyID"));
            }

            DataTable dt = compBLL.GetListPaging(ht, pageSize, pageIndex, out itemCount);

            AspNetPager.AlwaysShow = true;
            AspNetPager.PageSize   = pageSize;

            AspNetPager.RecordCount      = itemCount;
            AspNetPager.CurrentPageIndex = pageIndex;

            rpData.DataSource = dt;
            rpData.DataBind();
        }
 public string get_say_Message(PublicModel request)
 {
     return request.Message;
 }