Beispiel #1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                this.ddlSelProject.Attributes.Add("onchange", this.ClientID + "ChangeProjectEvent(this.value);");

                if (!this.IsPostBack)
                {
                    // 在此处放置用户代码以初始化页面
                    EntityData entity = new EntityData("Project");
                    DataTable  dt     = entity.CurrentTable;

                    if (this.access == "CanAccess")
                    {
                        if (Session["User"] != null)
                        {
                            User user = (User)Session["User"];
                            dt = user.m_EntityDataAccessProject.CurrentTable.Copy();
                        }
                    }
                    else
                    {
                        dt = DAL.EntityDAO.ProjectDAO.GetAllProject().CurrentTable.Copy();
                    }

                    DataRow dr = dt.NewRow();
                    dr["projectName"] = "--请选择--";
                    dr["projectCode"] = "";
                    dt.Rows.Add(dr);
                    DataView dv = dt.DefaultView;
                    dv.Sort = "projectCode";

                    this.ddlSelProject.DataSource     = dv;
                    this.ddlSelProject.DataTextField  = "projectName";
                    this.ddlSelProject.DataValueField = "projectCode";
                    this.ddlSelProject.DataBind();
                }
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "初始化页面出错:" + ex.Message));
            }
        }
Beispiel #2
0
        /// <summary>
        ///返回选中工作项的编码字符串,以","分隔
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SaveToolsButton_ServerClick(object sender, System.EventArgs e)
        {
            System.Web.UI.WebControls.CheckBox chkWBS;
            StringBuilder strBuilder     = new StringBuilder();
            StringBuilder strBuilderName = new StringBuilder();

            try
            {
                foreach (DataGridItem oDataGridItem in this.dgTaskList.Items)
                {
                    chkWBS = (CheckBox)oDataGridItem.FindControl("checkTask");
                    if (chkWBS.Checked == true)
                    {
                        strBuilder.Append(this.dgTaskList.DataKeys[oDataGridItem.ItemIndex].ToString());
                        strBuilder.Append(",");
                        System.Web.UI.HtmlControls.HtmlAnchor anchor = (System.Web.UI.HtmlControls.HtmlAnchor) this.dgTaskList.Items[oDataGridItem.ItemIndex].FindControl("taskName");
                        strBuilderName.Append(anchor.Attributes["name"]);
                        strBuilderName.Append(",");
                    }
                }
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "保存相关工作项失败");
            }

            string Code = (string)ViewState["SelectCode"] + "," + strBuilder.ToString();
            string Name = (string)ViewState["SelectName"] + "," + strBuilderName.ToString();

            if (Code.Length > 0)
            {
                Code = Code.Substring(0, Code.Length - 1);
                Response.Write(JavaScript.ScriptStart);
                Response.Write("window.opener.SelectTaskReturn('" + CutRepeat(Code) + "','" + CutRepeat(Name) + "');");
                Response.Write("window.close();");
                Response.Write(JavaScript.ScriptEnd);
            }
            else
            {
                Response.Write(JavaScript.ScriptStart);
                Response.Write("window.close();");
                Response.Write(JavaScript.ScriptEnd);
            }
        }
Beispiel #3
0
        private void LoadDataGrid()
        {
            try
            {
                SalSuplStrategyBuilder sb = new SalSuplStrategyBuilder();

                string ProjectCode = this.sltSearchProject.Value.Trim();
                if (ProjectCode != "")
                {
                    sb.AddStrategy(new Strategy(SalSuplStrategyName.ProjectCode, ProjectCode));
                }

                string SuplCode = this.txtSearchSuplCode.Value.Trim();
                if (SuplCode != "")
                {
                    sb.AddStrategy(new Strategy(SalSuplStrategyName.SuplCode, SuplCode));
                }

                string SuplName = this.txtSearchSuplName.Value.Trim();
                if (SuplName != "")
                {
                    sb.AddStrategy(new Strategy(SalSuplStrategyName.SuplName, SuplName));
                }

                sb.AddOrder("SuplCode", true);

                string sql = sb.BuildMainQueryString();

                QueryAgent qa     = new QueryAgent();
                EntityData entity = qa.FillEntityData("SalSupl", sql);
                qa.Dispose();

//				EntityData entity = DAL.EntityDAO.SalDAO.GetSalSuplByProjectCode(this.txtProjectCode.Value);

                dgList.DataSource = entity;
                dgList.DataBind();
                entity.Dispose();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "显示列表出错:" + ex.Message));
            }
        }
        private void IniPage()
        {
            try
            {
                this.txtType.Value      = Request.QueryString["Type"];
                this.txtAllowNull.Value = Request.QueryString["AllowNull"];

                this.txtType.Value = this.txtType.Value.ToLower();

                switch (this.txtType.Value)
                {
                case "multi":
                    //多选
                    this.dgList.Columns[0].Visible = true;
                    this.dgList.Columns[1].Visible = true;
                    this.dgList.Columns[2].Visible = false;

                    this.trMulti1.Style["display"]  = "block";
                    this.trSingle1.Style["display"] = "none";

                    break;

                default:
                    //单选
                    //允许清除
                    if (this.txtAllowNull.Value == "1")
                    {
                        this.btnClear.Style["display"] = "";
                    }

                    break;
                }

                //				this.txtJgYear.Value=DateTime.Now.Year.ToString();
                //				this.txtKgYear.Value=DateTime.Now.Year.ToString();

                BLL.PageFacade.LoadProjectStatusSelect(this.sltSearchStatus, true);
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "加载项目列表页面错误。");
                Response.Write(Rms.Web.JavaScript.Alert(true, "加载项目列表页面错误。"));
            }
        }
Beispiel #5
0
        private void LoadData()
        {
            string ContractCode = this.txtContractCode.Value;

            try
            {
                if (ContractCode != "")
                {
                    EntityData entity = DAL.EntityDAO.SalDAO.GetStandard_SalContractByCode(ContractCode);

                    if (entity.HasRecord())
                    {
                        this.lbContractID.Text   = entity.GetString("ContractID");
                        this.lbContractDate.Text = entity.GetDateTime("ContractDate", "yyyy-MM-dd");
                        this.lbClientName.Text   = entity.GetString("ClientName");
                        this.lbChamberName.Text  = entity.GetString("ChamberName");
                        this.lbRoom.Text         = entity.GetString("Room");
                        this.lbBofangCode.Text   = entity.GetString("BofangCode");
                        this.lbTotalPrice.Text   = entity.GetDecimal("TotalPrice").ToString("n");
                        this.lbFactPrice.Text    = entity.GetDecimal("FactPrice").ToString("n");
                        this.lbUnitPrice.Text    = entity.GetDecimal("UnitPrice").ToString("n");
                        this.lbBuildDim.Text     = entity.GetDecimal("BuildDim").ToString("n");
                        this.lbRoomDim.Text      = entity.GetDecimal("RoomDim").ToString("n");
                    }

                    entity.SetCurrentTable("SalPayPlan");
                    this.dgSalPayPlan.DataSource            = entity.CurrentTable;
                    this.dgSalPayPlan.Columns[2].FooterText = Total(entity.CurrentTable, "PlanMoney").ToString("n"); //BLL.MathRule.SumColumn(entity.CurrentTable, "PlanMoney").ToString("f");
                    this.dgSalPayPlan.Columns[3].FooterText = Total(entity.CurrentTable, "PayMoney").ToString("n");  //BLL.MathRule.SumColumn(entity.CurrentTable, "PayMoney").ToString("f");
                    this.dgSalPayPlan.DataBind();

                    entity.SetCurrentTable("SalPay");
                    this.dgSalPay.DataSource            = entity.CurrentTable;
                    this.dgSalPay.Columns[2].FooterText = Total(entity.CurrentTable, "PayMoney").ToString("n");//BLL.MathRule.SumColumn(entity.CurrentTable, "PayMoney").ToString("f");
                    this.dgSalPay.DataBind();

                    entity.Dispose();
                }
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
            }
        }
Beispiel #6
0
    public override void LoadData()
    {
        try
        {
            if (this.ApplicationCode != "")
            {
                this.OperationCode = this.ApplicationCode;
            }
            else if (this.OperationCode != "")
            {
                this.ApplicationCode = this.OperationCode;
            }
            else
            {
                isNew = true;
            }

            //业务呈现
            if (!isNew)
            {
                if (this.State == RmsPM.Web.WorkFlowControl.ModuleState.Operable)
                {
                    this.DocumentFileFormView.ChangeMode(FormViewMode.Edit);
                }
                else
                {
                    this.DocumentFileFormView.ChangeMode(FormViewMode.ReadOnly);
                }
                this.DocumentFileObjectDataSource.SelectParameters.Clear();
                this.DocumentFileObjectDataSource.SelectParameters.Add("Code", Request.QueryString["ApplicationCode"]);
                //RmsPM.Web.UserControls.AttachMentList Attachmentlist1 = (RmsPM.Web.UserControls.AttachMentList)this.DocumentFileFormView.Row.FindControl("Attachmentlist1");
                //Attachmentlist1.MasterCode = this.ApplicationCode;
            }
            else
            {
                this.DocumentFileFormView.ChangeMode(FormViewMode.Insert);
            }
        }
        catch (Exception ex)
        {
            ApplicationLog.WriteLog(this.ToString(), ex, "");
            Response.Write(Rms.Web.JavaScript.Alert(true, "读取业务数据出错:" + ex.Message));
        }
    }
        /// <summary>
        /// 保存数据(状态修改)
        /// </summary>
        public void SaveData()
        {
            try
            {
                string[]  chkCodes = {};
                ArrayList chkAL    = new ArrayList();
                //string strchkSelect = "";
                for (int i = 0; i < dgList.Items.Count; i++)
                {
                    if (((HtmlInputCheckBox)dgList.Items[i].FindControl("chkSelect")).Checked)
                    {
                        chkAL.Add(dgList.Items[i].Cells[0].Text.Trim());
                    }
                }

                BLL.BiddingSupplier cbs = new RmsPM.BLL.BiddingSupplier();
                cbs.BiddingPrejudicationCode = this.BiddingPrejudicationCode;
                cbs.dao = dao;
                DataTable myDT    = cbs.GetBiddingSuppliers();
                int       dtCount = myDT.Rows.Count;
                for (int r = 0; r < dtCount; r++)
                {
                    string strCode = myDT.Rows[r]["BiddingSupplierCode"].ToString();

                    cbs.BiddingSupplierCode = strCode;
                    if (chkAL.Contains(strCode))
                    {
                        cbs.Flag = "1";
                    }
                    else
                    {
                        cbs.Flag = "0";
                    }

                    cbs.BiddingSupplierUpdate();
                }
                myDT.Dispose();
                UpdateDepartMentSelect();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
            }
        }
Beispiel #8
0
        private void IniPage()
        {
            try
            {
                EntityData entity            = DAL.EntityDAO.WorkFlowDAO.GetAllWorkFlowProcedure();
                int        iCount            = entity.CurrentTable.Rows.Count;
                string     tempProcedureName = "";

                List <string> ProcedureNameList = new List <string>();
                for (int i = 0; i < iCount; i++)
                {
                    entity.SetCurrentRow(i);
                    string Activity = entity.GetInt("Activity").ToString();
                    if (Activity == "0")
                    {
                        continue;
                    }
                    string ProcedureName = entity.GetString("ProcedureName");
                    if (!ProcedureNameList.Contains(ProcedureName))
                    {
                        this.sltProcedure.Items.Add(new ListItem(entity.GetString("description"), entity.GetString("ProcedureName")));
                        ProcedureNameList.Add(ProcedureName);
                    }
                }
                entity.Dispose();
                if (Request["ProcedureName"] != null)
                {
                    this.sltProcedure.SelectedIndex = this.sltProcedure.Items.IndexOf(this.sltProcedure.Items.FindByValue(Request["ProcedureName"].ToString()));
                }

                this.DropDownProject.DataSource     = new DataView(user.m_EntityDataAccessProject.CurrentTable, "", "ProjectName", DataViewRowState.CurrentRows);
                this.DropDownProject.DataTextField  = "ProjectShortName";
                this.DropDownProject.DataValueField = "ProjectCode";
                this.DropDownProject.DataBind();
                ListItem li = new ListItem("--所有项目--", "");

                this.DropDownProject.Items.Add(li);
                this.DropDownProject.SelectedIndex = this.DropDownProject.Items.IndexOf(this.DropDownProject.Items.FindByValue(""));
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
            }
        }
Beispiel #9
0
        private void btnAddNew_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            string name = this.txtName.Text.Trim();

            if (name == "")
            {
                Response.Write(Rms.Web.JavaScript.Alert(true, "请填写字典项 !"));
                return;
            }
            string dictNameCode = ViewState["DictionaryNameCode"].ToString();

            try
            {
                string     projectCode = "" + Request.QueryString["ProjectCode"];
                int        MaxID       = 0;
                EntityData entity      = RmsPM.DAL.EntityDAO.SystemManageDAO.GetStandard_DictionaryNameByCode(dictNameCode);
                entity.SetCurrentTable("DictionaryItem");
                int iC = entity.CurrentTable.Rows.Count;
                if (iC > 0)
                {
                    entity.SetCurrentRow(iC - 1);
                    MaxID = entity.GetInt("SortID");
                }
                MaxID++;

                DataRow dr = entity.GetNewRecord();
                dr["DictionaryItemCode"] = RmsPM.DAL.EntityDAO.SystemManageDAO.GetNewSysCode("DictionaryItemCode");
                dr["Name"]               = this.txtName.Text;
                dr["SortID"]             = MaxID;
                dr["ProjectCode"]        = projectCode;
                dr["DictionaryNameCode"] = dictNameCode;

                entity.AddNewRecord(dr);
                RmsPM.DAL.EntityDAO.SystemManageDAO.SubmitAllStandard_DictionaryName(entity);
                entity.Dispose();
                LoadItemData(dictNameCode, -1);
                Clear();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "新增出错"));
            }
        }
Beispiel #10
0
        /// <summary>
        /// 分摊
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnApport_ServerClick(object sender, System.EventArgs e)
        {
            try
            {
                decimal ProjectPInvest   = BLL.ConvertRule.ToDecimal(this.txtProjectPInvest.Value);
                decimal ProjectBuildArea = BLL.ConvertRule.ToDecimal(this.txtSumTotalBuildArea.Value);

                DataTable tb = ScreenToTable(false);

                int     iCount     = tb.Rows.Count;
                decimal SumPInvest = 0;
                for (int i = 0; i < iCount; i++)
                {
                    DataRow dr = tb.Rows[i];

                    decimal BuildArea = BLL.ConvertRule.ToDecimal(dr["TotalBuildArea"]);
                    decimal PInvest   = 0;

                    if (i < iCount - 1)
                    {
                        if (ProjectBuildArea != 0)
                        {
                            PInvest = Math.Round(ProjectPInvest * (BuildArea / ProjectBuildArea), 2);
                        }
                    }
                    else
                    {
                        //最后一条 = 总金额 - 前(n-1)条金额
                        PInvest = ProjectPInvest - SumPInvest;
                    }

                    SumPInvest = SumPInvest + PInvest;

                    dr["PTotalInvest"] = PInvest;
                }

                BindDataGrid(tb);
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "分摊出错:" + ex.Message));
            }
        }
Beispiel #11
0
        private void btnDown_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            int itemIndex = this.dgItem.SelectedIndex;

            if (itemIndex >= this.dgItem.Items.Count)
            {
                return;
            }
            int newIndex = itemIndex + 1;

            string projectCode  = Request["ProjectCode"] + "";
            string dictNameCode = ViewState["DictionaryNameCode"].ToString();

            try
            {
                EntityData entity = RmsPM.DAL.EntityDAO.SystemManageDAO.GetStandard_DictionaryNameByCode(dictNameCode);
                entity.SetCurrentTable("DictionaryItem");

                int iCount = entity.CurrentTable.Rows.Count;
                for (int i = 0; i < iCount; i++)
                {
                    entity.SetCurrentRow(i);
                    if (i == (itemIndex + 1))
                    {
                        entity.CurrentRow["SortID"] = itemIndex;
                    }
                    else if (i == itemIndex)
                    {
                        entity.CurrentRow["SortID"] = itemIndex + 1;
                    }
                    else
                    {
                        entity.CurrentRow["SortID"] = i;
                    }
                }
                DAL.EntityDAO.SystemManageDAO.SubmitAllStandard_DictionaryName(entity);
                LoadItemData(dictNameCode, newIndex);
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "移动出错"));
            }
        }
Beispiel #12
0
        private void LoadData()
        {
            try
            {
                string GroundWorkCode = this.txtGroundWorkCode.Value;

                if (GroundWorkCode != "")
                {
                    EntityData entity = DAL.EntityDAO.ConstructDAO.GetGroundWorkByCode(GroundWorkCode);
                    if (entity.HasRecord())
                    {
                        this.txtProjectCode.Value = entity.GetString("ProjectCode");

                        this.ucTask.ProjectCode = this.txtProjectCode.Value;
                        this.ucTask.Value       = entity.GetString("WBSCode");
                    }
                    else
                    {
                        Response.Write(Rms.Web.JavaScript.Alert(true, "工程剖面图不存在"));
                        return;
                    }
                    entity.Dispose();
                }
                else
                {
                    //新增时就生成序号
//					this.txtGroundWorkCode.Value = DAL.EntityDAO.SystemManageDAO.GetNewSysCode("GroundWorkCode");
                }

                if (this.txtProjectCode.Value == "")
                {
                    Response.Write(Rms.Web.JavaScript.Alert(true, "未传入项目代码"));
                    return;
                }

                LoadImage();
                LoadDataGrid();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "初始化页面出错:" + ex.Message));
            }
        }
Beispiel #13
0
        private void BuildSqlString()
        {
            try
            {
                WorkFlowProcedureStrategyBuilder sb = new WorkFlowProcedureStrategyBuilder();
                if (this.txtDescription.Value != "")
                {
                    sb.AddStrategy(new Strategy(WorkFlowProcedureStrategyName.DescriptionLike, "%" + this.txtDescription.Value + "%"));
                }
                if (this.txtProcedureName.Value != "")
                {
                    sb.AddStrategy(new Strategy(WorkFlowProcedureStrategyName.ProcedureNameLike, "%" + this.txtProcedureName.Value + "%"));
                }
                if (this.DropDownProject.SelectedValue != "")
                {
                    sb.AddStrategy(new Strategy(WorkFlowProcedureStrategyName.ProjectCode, this.DropDownProject.SelectedValue));
                }
                if (this.DropDownActivity.SelectedValue != "")
                {
                    sb.AddStrategy(new Strategy(WorkFlowProcedureStrategyName.Activity, this.DropDownActivity.SelectedValue));
                }
                if (this.DropDownType.SelectedValue != "")
                {
                    sb.AddStrategy(new Strategy(WorkFlowProcedureStrategyName.Type, this.DropDownType.SelectedValue));
                }
                if (this.VersionNumber.Value != "")
                {
                    sb.AddStrategy(new Strategy(WorkFlowProcedureStrategyName.VersionNumber, this.VersionNumber.Value));
                }

                string sql = sb.BuildMainQueryString();
                //排序
                string sortsql = BLL.GridSort.GetSortSQL(ViewState, "VersionDescription asc");
                if (sortsql != "")
                {
                    sql = sql + " order by " + sortsql;
                }
                this.ViewState.Add("SqlString", sql);
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
            }
        }
Beispiel #14
0
        /// <summary>
        /// 初始化人员列表
        /// </summary>
        private void LoadData()
        {
            try
            {
                string WBSCode = Request.QueryString["WBSCode"] + "";

                EntityData entityUser = WBSDAO.GetTaskPersonByWBSCode(WBSCode);
                if (entityUser.HasRecord())
                {
                    DataTable dt = entityUser.CurrentTable.Clone();
                    foreach (DataRow dr in entityUser.CurrentTable.Rows)
                    {
                        switch (dr["Type"].ToString())
                        {
                        case "2":
                            this.lblMaster.Text        = BLL.SystemRule.GetUserName(dr["UserCode"].ToString());
                            this.hMasterCode.Value     = dr["UserCode"].ToString();
                            this.txtMasterDetail.Value = dr["MainTask"].ToString();
                            break;

                        case "1":
                            this.lblMonitor.Text        = BLL.SystemRule.GetUserName(dr["UserCode"].ToString());
                            this.hMonitorCode.Value     = dr["UserCode"].ToString();
                            this.txtMonitorDetail.Value = dr["MainTask"].ToString();
                            break;

                        case "0":
                            dt.Rows.Add(dr.ItemArray);
                            break;
                        }
                    }
                    this.dgUserList.DataSource = dt;
                    this.dgUserList.DataBind();
                    Session["UserList"] = dt;
                }

                this.btnMaster.Value  = (this.lblMaster.Text == "")?"新增负责人":"更换负责人";
                this.btnMonitor.Value = (this.lblMonitor.Text == "")?"新增监督人":"更换监督人";
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
            }
        }
Beispiel #15
0
        protected void btnOK_ServerClick(object sender, System.EventArgs e)
        {
            if (this.txtFile.PostedFile.FileName == "")
            {
                Response.Write(Rms.Web.JavaScript.Alert(true, "请选择文件"));
                return;
            }

            try
            {
                //清空核算部门
                BLL.PaymentRule.DeleteAllUFUnit();

                StreamReader m_sr = new StreamReader(this.txtFile.PostedFile.InputStream, System.Text.Encoding.Default);

                //第1行是标题
                if (m_sr.Peek() >= 0)
                {
                    m_sr.ReadLine();
                }

                SingleEntityDAO dao    = new SingleEntityDAO("UFUnit");
                EntityData      entity = new EntityData("UFUnit");

                while (m_sr.Peek() >= 0)
                {
                    string s = m_sr.ReadLine();

                    ImportUFUnitSingle(s, dao, entity);
                }
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                throw ex;
            }

            Response.Write(JavaScript.ScriptStart);
            Response.Write(JavaScript.Alert(false, "导入完成"));
            Response.Write("window.opener.location = window.opener.location;");
            Response.Write(JavaScript.WinClose(false));
            Response.Write(JavaScript.ScriptEnd);
            Response.End();
        }
Beispiel #16
0
		/// <summary>
		/// 控件初始化
		/// </summary>
//		public void InitControl()
		override public void InitControl()
		{
			try
			{
				this.Visible = true;

				switch ( this.State )
				{
					case ModuleState.Sightless://不可见的
						this.Visible = false;
						break;

					case  ModuleState.Operable://可操作的
						LoadData();
						EyeableDiv.Visible = false;
						OperableDiv.Visible = true;
						break;

					case ModuleState.Eyeable://可见的
						LoadData();
						OperableDiv.Visible = false;
						EyeableDiv.Visible = false;
						break;

					case  ModuleState.Begin://不可见的
						this.Visible = false;
						break;

					case ModuleState.End://不可见的
						this.Visible = false;
						break;

					default:
						this.Visible = false;
						break;
				}


			}
			catch(Exception ex)
			{
				ApplicationLog.WriteLog(this.ToString(),ex,"");
			}
		}
Beispiel #17
0
        private string SaveToSession()
        {
            string alertMsg = "";

            try
            {
                string contractCode = this.txtContractCode.Value;
                string projectCode  = Request["ProjectCode"] + "";


                EntityData entity = (EntityData)Session["ContractMaterialMonthEntity"];
                foreach (DataGridItem li in this.dgDtl.Items)
                {
                    string ContractMaterialMonthCode = li.Cells[0].Text;

                    string         ContractMaterialMonth = ((AspWebControl.Calendar)li.FindControl("dtContractMaterialMonth")).Value;
                    WebNumericEdit txtQty = (WebNumericEdit)li.FindControl("txtQty");


                    foreach (DataRow dr in entity.Tables["ContractMaterialMonth"].Select(String.Format("ContractMaterialMonthCode='{0}'", ContractMaterialMonthCode)))
                    {
                        dr["Qty"] = txtQty.ValueDecimal;

                        if (ContractMaterialMonth != "")
                        {
                            dr["ContractMaterialMonth"] = ContractMaterialMonth;
                        }
                        else
                        {
                            dr["ContractMaterialMonth"] = System.DBNull.Value;
                        }
                    }
                }

                Session["ContractMaterialMonthEntity"] = entity;
                entity.Dispose();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "保存出错:" + ex.Message));
            }
            return(alertMsg);
        }
Beispiel #18
0
        private void IniPage()
        {
            try
            {
                this.txtBuildingCode.Value = Request.QueryString["BuildingCode"];
                this.txtParentCode.Value   = Request.QueryString["ParentCode"];
                this.txtProjectCode.Value  = Request.QueryString["ProjectCode"];

                //新增时必须传入项目代码
                if ((this.txtBuildingCode.Value == "") && (this.txtProjectCode.Value == ""))
                {
                    Response.Write(Rms.Web.JavaScript.Alert(true, "无项目代码,不能新增"));
                    Response.End();
                }

                if (this.txtBuildingCode.Value == "")
                {
                    this.btnDelete.Visible = false;
                }

                EntityData entity = null;

                if (this.txtBuildingCode.Value != "")
                {
                    entity = ProductDAO.GetBuildingByCode(this.txtBuildingCode.Value);
                    this.txtProjectCode.Value = entity.GetString("ProjectCode");
                }

                PageFacade.LoadPBSAreaSelect(this.sltParentCode, "", this.txtProjectCode.Value, entity);

                if (this.txtBuildingCode.Value == "")
                {
                    //新增楼栋缺省值
                    this.sltParentCode.Value = this.txtParentCode.Value;
                }

                LoadData(entity);
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "初始化页面出错:" + ex.Message));
            }
        }
Beispiel #19
0
        private void LoadData()
        {
            string cbsModuleCode = Request["CBSModuleCode"] + "";

            try
            {
                EntityData entity = DAL.EntityDAO.CBSDAO.GetCBSModuleByCode(cbsModuleCode);
                if (entity.HasRecord())
                {
                    this.txtName.Value   = entity.GetString("CBSModuleName");
                    this.txtRemark.Value = entity.GetString("Remark");
                }
                entity.Dispose();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
            }
        }
Beispiel #20
0
        private void IniPage()
        {
            try
            {
                this.txtSubjectSetCode.Value = Request.QueryString["SubjectSetCode"];

//				this.spanFinanceInterface.InnerText = BLL.FinanceRule.GetFinanceInterfaceName();

                BLL.PageFacade.LoadFinanceInterfaceAnalysisTypeSelect(this.sltAnalysisType, "");
                BLL.PageFacade.LoadSubjectSetSelect(this.sltSubjectSet, this.txtSubjectSetCode.Value);

//				if (!user.HasRight("110701")) this.hrefSetup.Attributes["onclick"] = "alert('无权限'); return false;";
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "初始化页面出错:" + ex.Message));
            }
        }
Beispiel #21
0
        private void IniPage()
        {
            try
            {
                this.txtProjectCode.Value = Request.QueryString["ProjectCode"];

                //年度
                int StartY = 0;
                int EndY   = 0;
                BLL.CashFlowRule.GetCashFlowStartEnd(this.txtProjectCode.Value, ref StartY, ref EndY);
                this.ucCostBudgetSelectMonth.MonthStart = StartY.ToString();
                this.ucCostBudgetSelectMonth.MonthEnd   = EndY.ToString();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "初始化页面出错:" + ex.Message));
            }
        }
Beispiel #22
0
    public override string RestoreStatus()
    {
        try
        {
            base.RestoreStatus();

            string ErrMsg = "";

            BiddingSystem.Set_BiddingState("3", this.BiddingCode);

            return(ErrMsg);
        }
        catch (Exception ex)
        {
            ApplicationLog.WriteLog(this.ToString(), ex, "");
            Response.Write(Rms.Web.JavaScript.Alert(true, "恢复业务数据状态出错:" + ex.Message));
            throw ex;
        }
    }
Beispiel #23
0
        protected void btnDelete_ServerClick(object sender, System.EventArgs e)
        {
            string UserCode = Request["UserCode"] + "";

            try
            {
                EntityData entity = DAL.EntityDAO.SystemManageDAO.GetStandard_SystemUserByCode(UserCode);
                DAL.EntityDAO.SystemManageDAO.DeleteStandard_SystemUser(entity);
                entity.Dispose();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "删除出错"));
                return;
            }

            WriteRefreshScript();
        }
        private void btnSave_ServerClick(object sender, System.EventArgs e)
        {
            string projectCode = Request["ProjectCode"] + "";

            try
            {
                //保存面积字段
                BLL.SystemRule.UpdateProjectConfigValue(projectCode, BLL.SystemRule.m_CostApportionBuildingAreaField, this.sltBuildingAreaField.Value);

                BLL.CostRule.ProjectCostApportion(projectCode, BLL.CostRule.GetApportionAreaField(projectCode));
                CloseWindow();
                //Response.End();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, ex.Message));
            }
        }
Beispiel #25
0
        /// ****************************************************************************
        /// <summary>
        /// 数据加载
        /// </summary>
        /// ****************************************************************************
        private void LoadData()
        {
            try
            {
                string     sql    = (string)this.ViewState["SqlString"];
                QueryAgent qa     = new QueryAgent();
                EntityData entity = qa.FillEntityData("WorkFlowAct", sql);
                qa.Dispose();
                this.dgList.DataSource = entity.CurrentTable;

                this.dgList.DataBind();
                this.gpControl.RowsCount = entity.CurrentTable.Rows.Count.ToString();
                entity.Dispose();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
            }
        }
Beispiel #26
0
        private void LoadProgress()
        {
            try
            {
                string     PBSUnitCode = this.txtPBSUnitCode.Value.Trim();
                EntityData entity      = BLL.ConstructRule.GetLastConstructProgressReport(this.txtPBSUnitCode.Value);

//				EntityData entity = DAL.EntityDAO.ConstructDAO.GetConstructProgressByPBSUnit(PBSUnitCode);

                this.dgProgress.DataSource = entity;
                this.dgProgress.DataBind();
                entity.Dispose();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "初始化页面出错:" + ex.Message));
            }
        }
Beispiel #27
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSaveClick(object sender, System.EventArgs e)
        {
            string contractCode = this.txtContractCode.Value;
            string projectCode  = Request["ProjectCode"] + "";
            string materialcode = Request.QueryString["MaterialCode"] + "";

            try
            {
                string msg = SaveToSession();
                if (msg != "")
                {
                    Response.Write(Rms.Web.JavaScript.Alert(true, msg));
                    return;
                }

                string ClearMsg = ClearData();
                if (ClearMsg != "")
                {
                    Response.Write(Rms.Web.JavaScript.Alert(true, ClearMsg));
                    return;
                }

                EntityData entity = (EntityData)Session["ContractMaterialMonthEntity"];
                //entity.SetCurrentTable("ContractMaterialMonth");
                DAL.EntityDAO.ContractDAO.SubmitAllContractMaterialMonth(entity);
                entity.Dispose();

                this.PanelItem.Visible = true;
                this.PanelEdit.Visible = false;
                //Response.Write("<script>window.location=window.location;</script>");

                //Session["ContractMaterialMonthEntity"] = null;
                //Session["ContractAct"] = null;
                //BindEditList(entity.CurrentTable, materialcode);
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "保存出错1:" + ex.Message));
                return;
            }
            GoBack();
        }
Beispiel #28
0
        /// <summary>
        /// 显示楼栋列表
        /// </summary>
        private void BindDataGrid()
        {
            try
            {
                DataTable tb = (DataTable)Session["tbRoom"];

                string[]  arrField = { "YuBoArea" };
                decimal[] arrValue = BLL.MathRule.SumColumn(tb, arrField);
                this.dgList.Columns[1].FooterText = "套数:" + tb.Rows.Count;
                this.dgList.Columns[2].FooterText = arrValue[0].ToString("0.####");
                this.dgList.DataSource            = tb;
                this.dgList.DataBind();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "显示列表出错:" + ex.Message));
            }
        }
 /// <summary>
 ///  改变业务数据状态(退回)
 /// </summary>
 /// <returns></returns>
 public override string RestoreStatus()
 {
     try
     {
         base.RestoreStatus();
         string ErrMsg = "";
         if (this.OperationCode != "new")
         {
             bfl.ModifyNotAuditing(int.Parse(this.OperationCode));
         }
         return(ErrMsg);
     }
     catch (Exception ex)
     {
         ApplicationLog.WriteLog(this.ToString(), ex, "");
         Response.Write(Rms.Web.JavaScript.Alert(true, "恢复业务数据状态出错:" + ex.Message));
         throw ex;
     }
 }
 /// <summary>
 /// 保存控件数据
 /// </summary>
 public override string SubmitData()
 {
     try
     {
         string ErrMsg = "";
         if (this.UserCode == "")
         {
             ErrMsg = "操作用户为空";
             return(ErrMsg);
         }
         return(ErrMsg);
     }
     catch (Exception ex)
     {
         ApplicationLog.WriteLog(this.ToString(), ex, "");
         Response.Write(Rms.Web.JavaScript.Alert(true, "保存出错:" + ex.Message));
         throw ex;
     }
 }