示例#1
0
文件: List.aspx.cs 项目: Marveliu/erp
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            BLL.tb_JC_Procedure bllProcedure = new BLL.tb_JC_Procedure();
            string id = gridProcedure.DataKeys[gridProcedure.SelectedRowIndex][0].ToString();

            Model.tb_JC_Procedure modelProcedure = bllProcedure.GetModel(id);
            modelProcedure.Status = "N";
            bool result = bllProcedure.Update(modelProcedure);

            if (result)
            {
                Alert.ShowInTop("删除成功", "信息", MessageBoxIcon.Information);
                BindGrid();
            }
            else
            {
                Alert.ShowInTop("删除失败", "错误", MessageBoxIcon.Error);
            }
        }
示例#2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            #region 检查
            #endregion
            #region 保存
            Model.tb_JC_Procedure modelProcedure = new Model.tb_JC_Procedure();
            modelProcedure.ID            = Request.QueryString["ID"].ToString();
            modelProcedure.ProcedureNO   = txbProcedureNO.Text;
            modelProcedure.ProcedureName = txbProcedureName.Text;
            modelProcedure.WorkCenterNO  = hdfWorkCenterNO.Text;
            modelProcedure.Status        = "Y";

            BLL.tb_JC_Procedure bllProcedure = new BLL.tb_JC_Procedure();
            bool result = bllProcedure.Update(modelProcedure);
            if (result)
            {
                Alert.ShowInTop("更新成功!", "信息", MessageBoxIcon.Information, ActiveWindow.GetHidePostBackReference("Main_Modify_Success"));
            }
            else
            {
                Alert.ShowInTop("更新失败!", "错误", MessageBoxIcon.Error, ActiveWindow.GetHidePostBackReference("Main_Modify_Fail"));
            }
            #endregion
        }