Пример #1
0
 /// <summary>
 /// 保存按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSave_Click(object sender, EventArgs e)
 {
     if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.PunishItemMenuId, Const.BtnSave))
     {
         Model.HSSE_Hazard_PunishItem title = new Model.HSSE_Hazard_PunishItem();
         title.PunishItemCode    = this.txtPunishItemCode.Text.Trim();
         title.PunishItemType    = this.rblPunishItemType.SelectedValue;
         title.PunishItemContent = this.txtPunishItemContent.Text.Trim();
         title.Deduction         = Funs.GetNewInt(this.drpDeduction.SelectedValue);
         title.PunishMoney       = Funs.GetNewInt(this.txtPunishMoney.Text.Trim());
         if (string.IsNullOrEmpty(this.PunishItemId))
         {
             this.PunishItemId  = SQLHelper.GetNewID(typeof(Model.HSSE_Hazard_PunishItem));
             title.PunishItemId = this.PunishItemId;
             BLL.HSSE_Hazard_PunishItemService.AddPunishItem(title);
             BLL.LogService.AddSys_Log(this.CurrUser, title.PunishItemCode, title.PunishItemId, BLL.Const.PunishItemMenuId, BLL.Const.BtnAdd);
         }
         else
         {
             title.PunishItemId = this.PunishItemId;
             BLL.HSSE_Hazard_PunishItemService.UpdatePunishItem(title);
             BLL.LogService.AddSys_Log(this.CurrUser, title.PunishItemCode, title.PunishItemId, BLL.Const.PunishItemMenuId, BLL.Const.BtnModify);
         }
         PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
     }
     else
     {
         ShowNotify("您没有这个权限,请与管理员联系!");
     }
 }
Пример #2
0
        /// <summary>
        /// 确定按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSure_Click(object sender, EventArgs e)
        {
            Model.CostGoods_HSSECostUnitManageItem newItem = new Model.CostGoods_HSSECostUnitManageItem
            {
                HSSECostUnitManageId = this.HSSECostUnitManageId,
                Type        = this.Type,
                SortIndex   = Funs.GetNewInt(this.txtSortIndex.Text.Trim()),
                ReportTime  = Funs.GetNewDateTime(this.txtReportTime.Text),
                CostContent = this.txtCostContent.Text.Trim(),
                Quantity    = Funs.GetNewDecimal(this.txtQuantity.Text),
                Metric      = this.txtMetric.Text.Trim(),
                Price       = Funs.GetNewDecimal(this.txtPrice.Text),
                TotalPrice  = Funs.GetNewDecimal(this.txtTotalPrice.Text),

                AuditQuantity   = Funs.GetNewDecimal(this.txtQuantity.Text),
                AuditPrice      = Funs.GetNewDecimal(this.txtPrice.Text),
                AuditTotalPrice = Funs.GetNewDecimal(this.txtTotalPrice.Text),
            };

            if (!string.IsNullOrEmpty(this.hdHSSECostUnitManageItemId.Text))
            {
                newItem.HSSECostUnitManageItemId = this.hdHSSECostUnitManageItemId.Text;
                BLL.HSSECostUnitManageItemService.UpdateHSSECostUnitManageItem(newItem);
            }
            else
            {
                newItem.HSSECostUnitManageItemId = SQLHelper.GetNewID(typeof(Model.CostGoods_HSSECostUnitManageItem));
                BLL.HSSECostUnitManageItemService.AddHSSECostUnitManageItem(newItem);
            }

            this.InitText();
            this.UpdateHSSECostUnitManage();
            this.BindGrid();
            PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(this.HSSECostUnitManageId) + "parent.__doPostBack('','HSSECostUnitManageItemWindowClose');");
        }
Пример #3
0
 /// <summary>
 /// 计算总价
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Text_TextChanged(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.txtCount.Text.Trim()) && !string.IsNullOrEmpty(this.txtPriceMoney.Text.Trim()))
     {
         int?    count = Funs.GetNewInt(this.txtCount.Text.Trim());
         decimal?price = Funs.GetNewDecimalOrZero(this.txtPriceMoney.Text.Trim());
         this.txtTotalMoney.Text = Convert.ToString(count * price);
     }
 }
Пример #4
0
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <param name="type"></param>
        private void SaveData(string type)
        {
            Model.Administrative_ManageCheck manageCheck = new Model.Administrative_ManageCheck
            {
                ProjectId       = this.ProjectId,
                ManageCheckCode = this.txtManageCheckCode.Text.Trim()
            };
            if (this.drpCheckTypeCode.SelectedValue != BLL.Const._Null)
            {
                manageCheck.CheckTypeCode = this.drpCheckTypeCode.SelectedValue;
            }
            manageCheck.SupplyCheck   = this.txtSupplyCheck.Text.Trim();
            manageCheck.IsSupplyCheck = Convert.ToBoolean(this.drpIsSupplyCheck.SelectedValue);
            manageCheck.ViolationRule = Funs.GetNewInt(this.drpViolationRule.SelectedValue);
            manageCheck.CheckPerson   = this.txtCheckPerson.Text.Trim();
            manageCheck.CheckTime     = Funs.GetNewDateTime(this.txtCheckTime.Text.Trim());
            manageCheck.VerifyPerson  = this.txtVerifyPerson.Text.Trim();
            manageCheck.VerifyTime    = Funs.GetNewDateTime(this.txtVerifyTime.Text.Trim());
            manageCheck.States        = BLL.Const.State_0;
            if (type == BLL.Const.BtnSubmit)
            {
                manageCheck.States = this.ctlAuditFlow.NextStep;
            }
            manageCheck.CompileMan  = this.CurrUser.UserId;
            manageCheck.CompileDate = DateTime.Now;

            BLL.ManageCheckItemService.DeleteMangeCheckItemByManageCheckId(this.ManageCheckId);

            if (!string.IsNullOrEmpty(this.ManageCheckId))
            {
                manageCheck.ManageCheckId = this.ManageCheckId;
                BLL.ManageCheckService.UpdateManageCheck(manageCheck);
                BLL.LogService.AddSys_Log(this.CurrUser, manageCheck.ManageCheckCode, manageCheck.ManageCheckId, BLL.Const.ManageCheckMenuId, BLL.Const.BtnModify);
            }
            else
            {
                this.ManageCheckId        = SQLHelper.GetNewID(typeof(Model.Administrative_ManageCheck));
                manageCheck.ManageCheckId = this.ManageCheckId;
                BLL.ManageCheckService.AddManageCheck(manageCheck);
                BLL.LogService.AddSys_Log(this.CurrUser, manageCheck.ManageCheckCode, manageCheck.ManageCheckId, BLL.Const.ManageCheckMenuId, BLL.Const.BtnAdd);
            }
            GetGvManageCheck(this.ManageCheckId);
            ////保存流程审核数据
            this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.ManageCheckMenuId, this.ManageCheckId, (type == BLL.Const.BtnSubmit ? true : false), this.drpCheckTypeCode.SelectedText, "../Administrative/ManageCheckView.aspx?ManageCheckId={0}");
        }
Пример #5
0
 /// <summary>
 /// 保存数据
 /// </summary>
 /// <param name="type"></param>
 private void SaveData(string type)
 {
     Model.Administrative_HealthManage healthManage = new Model.Administrative_HealthManage
     {
         ProjectId = this.ProjectId
     };
     if (this.drpPersonId.SelectedValue != BLL.Const._Null)
     {
         healthManage.PersonId = this.drpPersonId.SelectedValue;
     }
     healthManage.Age         = Funs.GetNewInt(this.txtAge.Text.Trim());
     healthManage.Bloodtype   = this.txtBloodtype.Text.Trim();
     healthManage.HealthState = this.txtHealthState.Text.Trim();
     healthManage.Taboo       = this.txtTaboo.Text.Trim();
     healthManage.CheckTime   = Funs.GetNewDateTime(this.txtCheckTime.Text.Trim());
     healthManage.Remark      = this.txtRemark.Text.Trim();
     healthManage.CompileMan  = this.CurrUser.UserId;
     healthManage.CompileDate = DateTime.Now;
     healthManage.States      = BLL.Const.State_0;
     if (type == BLL.Const.BtnSubmit)
     {
         healthManage.States = this.ctlAuditFlow.NextStep;
     }
     if (!string.IsNullOrEmpty(this.HealthManageId))
     {
         healthManage.HealthManageId = this.HealthManageId;
         BLL.HealthManageService.UpdateHealthManage(healthManage);
         BLL.LogService.AddSys_Log(this.CurrUser, this.drpPersonId.SelectedText, healthManage.HealthManageId, BLL.Const.HealthManageMenuId, BLL.Const.BtnModify);
     }
     else
     {
         this.HealthManageId         = SQLHelper.GetNewID(typeof(Model.Administrative_HealthManage));
         healthManage.HealthManageId = this.HealthManageId;
         BLL.HealthManageService.AddHealthManage(healthManage);
         BLL.LogService.AddSys_Log(this.CurrUser, this.drpPersonId.SelectedText, healthManage.HealthManageId, BLL.Const.HealthManageMenuId, BLL.Const.BtnAdd);
     }
     ////保存流程审核数据
     this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.HealthManageMenuId, this.HealthManageId, (type == BLL.Const.BtnSubmit ? true : false), this.drpPersonId.SelectedText.Trim(), "../Administrative/HealthManageView.aspx?HealthManageId={0}");
 }
Пример #6
0
 /// <summary>
 /// 保存按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSave_Click(object sender, EventArgs e)
 {
     Model.CostGoods_CostManageItem costManageItem = new Model.CostGoods_CostManageItem
     {
         CostManageId      = this.CostManageId,
         InvestCostProject = this.drpInvestCostProject.SelectedValue,
         UseReason         = this.txtUseReason.Text.Trim(),
         Counts            = Funs.GetNewInt(this.txtCount.Text.Trim()),
         PriceMoney        = Funs.GetNewDecimalOrZero(this.txtPriceMoney.Text.Trim()),
     };
     if (!string.IsNullOrEmpty(this.CostManageItemId))
     {
         costManageItem.CostManageItemId = this.CostManageItemId;
         BLL.CostManageItemService.UpdateCostManageItem(costManageItem);
     }
     else
     {
         this.CostManageItemId           = SQLHelper.GetNewID(typeof(Model.CostGoods_CostManageItem));
         costManageItem.CostManageItemId = this.CostManageItemId;
         BLL.CostManageItemService.AddCostManageItem(costManageItem);
     }
     PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
 }
Пример #7
0
 /// <summary>
 /// 保存数据
 /// </summary>
 /// <param name="type"></param>
 private void SaveData(string type)
 {
     Model.CostGoods_GoodsOut goodsOut = new Model.CostGoods_GoodsOut
     {
         ProjectId    = this.ProjectId,
         GoodsOutCode = this.txtGoodsOutCode.Text.Trim()
     };
     if (!string.IsNullOrEmpty(this.hdGoodsDefId.Text.Trim()))
     {
         goodsOut.GoodsDefId = this.hdGoodsDefId.Text.Trim();
     }
     goodsOut.GoodsNum  = Funs.GetNewInt(this.txtCounts.Text.Trim());
     goodsOut.OutPerson = this.txtOutPerson.Text.Trim();
     goodsOut.OutDate   = Funs.GetNewDateTime(this.txtOutDate.Text.Trim());
     goodsOut.States    = BLL.Const.State_0;
     if (type == BLL.Const.BtnSubmit)
     {
         goodsOut.States = this.ctlAuditFlow.NextStep;
     }
     goodsOut.CompileMan  = this.CurrUser.UserId;
     goodsOut.CompileDate = DateTime.Now;
     if (!string.IsNullOrEmpty(this.GoodsOutId))
     {
         goodsOut.GoodsOutId = this.GoodsOutId;
         BLL.GoodsOut2Service.UpdateGoodsOut(goodsOut);
         BLL.LogService.AddSys_Log(this.CurrUser, goodsOut.GoodsOutCode, goodsOut.GoodsOutId, BLL.Const.GoodsOut2MenuId, BLL.Const.BtnModify);
     }
     else
     {
         this.GoodsOutId     = SQLHelper.GetNewID(typeof(Model.CostGoods_GoodsOut));
         goodsOut.GoodsOutId = this.GoodsOutId;
         BLL.GoodsOut2Service.AddGoodsOut(goodsOut);
         BLL.LogService.AddSys_Log(this.CurrUser, goodsOut.GoodsOutCode, goodsOut.GoodsOutId, BLL.Const.GoodsOut2MenuId, BLL.Const.BtnAdd);
     }
     ////保存流程审核数据
     this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.GoodsOut2MenuId, this.GoodsOutId, (type == BLL.Const.BtnSubmit ? true : false), goodsOut.GoodsOutCode, "../CostGoods/GoodsOutView.aspx?GoodsOutId={0}");
 }
Пример #8
0
        /// <summary>
        /// 保存按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (this.drpLicenseType.SelectedValue == Const._Null)
            {
                Alert.ShowInParent("请作业许可证类型!", MessageBoxIcon.Warning);
                return;
            }
            if (BLL.SafetyMeasuresService.IsExistSafetyMeasures(this.SafetyMeasuresId, this.txtSafetyMeasures.Text.Trim()))
            {
                Alert.ShowInParent("安全措施名称已存在,请修改后再保存!", MessageBoxIcon.Warning);
                return;
            }

            Model.Base_SafetyMeasures newSafetyMeasures = new Model.Base_SafetyMeasures
            {
                SortIndex      = Funs.GetNewInt(this.txtSortIndex.Text.Trim()),
                SafetyMeasures = this.txtSafetyMeasures.Text.Trim()
            };
            if (this.drpLicenseType.SelectedValue != Const._Null)
            {
                newSafetyMeasures.LicenseType = this.drpLicenseType.SelectedValue;
            }
            if (string.IsNullOrEmpty(this.SafetyMeasuresId))
            {
                newSafetyMeasures.SafetyMeasuresId = SQLHelper.GetNewID(typeof(Model.Base_SafetyMeasures));
                BLL.SafetyMeasuresService.AddSafetyMeasures(newSafetyMeasures);
                BLL.LogService.AddSys_Log(this.CurrUser, newSafetyMeasures.SortIndex.ToString(), newSafetyMeasures.SafetyMeasuresId, BLL.Const.SafetyMeasuresMenuId, Const.BtnAdd);
            }
            else
            {
                newSafetyMeasures.SafetyMeasuresId = this.SafetyMeasuresId;
                BLL.SafetyMeasuresService.UpdateSafetyMeasures(newSafetyMeasures);
                BLL.LogService.AddSys_Log(this.CurrUser, newSafetyMeasures.SortIndex.ToString(), newSafetyMeasures.SafetyMeasuresId, BLL.Const.SafetyMeasuresMenuId, Const.BtnModify);
            }
            PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
        }
Пример #9
0
        /// <summary>
        /// 检查并保存其他HSE管理活动集合
        /// </summary>
        private void jerqueSaveMonthPlanList()
        {
            costManageItems.Clear();
            JArray mergedData = Grid1.GetMergedData();

            foreach (JObject mergedRow in mergedData)
            {
                string  status = mergedRow.Value <string>("status");
                JObject values = mergedRow.Value <JObject>("values");
                int     i      = mergedRow.Value <int>("index");
                Model.CostGoods_CostManageItem costManageItem = new Model.CostGoods_CostManageItem
                {
                    CostManageItemId  = this.Grid1.Rows[i].DataKeys[0].ToString(),
                    InvestCostProject = values.Value <string>("InvestCostProject").ToString(),
                    UseReason         = values.Value <string>("UseReason").ToString(),
                    Counts            = Funs.GetNewIntOrZero(values.Value <string>("Counts").ToString()),
                    PriceMoney        = Funs.GetNewDecimalOrZero(values.Value <string>("PriceMoney").ToString()),
                    AuditCounts       = !string.IsNullOrEmpty(values.Value <string>("AuditCounts").ToString()) ? Funs.GetNewInt(values.Value <string>("AuditCounts").ToString()) : null,
                    AuditPriceMoney   = !string.IsNullOrEmpty(values.Value <string>("AuditPriceMoney").ToString()) ? Funs.GetNewDecimal(values.Value <string>("AuditPriceMoney").ToString()) : null
                };
                costManageItems.Add(costManageItem);
            }
        }