void UCRepairMealAddOrEdit_StatusEvent(object sender, EventArgs e) { List <SQLObj> listSql = new List <SQLObj>(); SQLObj obj = new SQLObj(); obj.cmdType = CommandType.Text; Dictionary <string, ParamObj> dicParam = new Dictionary <string, ParamObj>(); string strMsg = string.Empty; if (strStatus == Convert.ToInt32(DataSources.EnumStatus.Start).ToString()) { strMsg = "停用"; dicParam.Add("status", new ParamObj("status", DataSources.EnumStatus.Stop, SysDbType.VarChar, 40));//状态 } else if (strStatus == Convert.ToInt32(DataSources.EnumStatus.Stop).ToString()) { strMsg = "启用"; dicParam.Add("status", new ParamObj("status", DataSources.EnumStatus.Start, SysDbType.VarChar, 40));//状态 } if (MessageBoxEx.Show("确认要" + strMsg + "吗?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } dicParam.Add("repair_package_set_id", new ParamObj("repair_package_set_id", strId, SysDbType.VarChar, 40)); //维修套餐Id dicParam.Add("update_by", new ParamObj("update_by", HXCPcClient.GlobalStaticObj.UserID, SysDbType.VarChar, 40)); //修改人Id dicParam.Add("update_time", new ParamObj("update_time", Common.LocalDateTimeToUtcLong(HXCPcClient.GlobalStaticObj.CurrentDateTime).ToString(), SysDbType.BigInt)); //修改时间 obj.sqlString = "update sys_b_set_repair_package_set set status=@status,update_by=@update_by,update_time=@update_time where repair_package_set_id=@repair_package_set_id"; obj.Param = dicParam; listSql.Add(obj); if (DBHelper.BatchExeSQLMultiByTrans("更新单据状态为启停用", listSql)) { MessageBoxEx.Show("" + strMsg + "成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); uc.BindPageData(); deleteMenuByTag(this.Tag.ToString(), this.uc.Name); } }