protected void bt_Uninstall_Click(object sender, EventArgs e) { if ((int)ViewState["TelephoneID"] != 0) { CM_PropertyInTelephoneBLL _bll = new CM_PropertyInTelephoneBLL((int)ViewState["TelephoneID"]); _bll.Model.UninstallDate = DateTime.Today; _bll.Model.State = 5; //已拆机状态 _bll.Model.UpdateStaff = (int)Session["UserID"]; if (_bll.Update() == 0) { MessageBox.ShowAndRedirect(this, "成功将该电话设为已拆机状态,以后无法再申请该电话的费用!", "PropertyDetail.aspx?ClientID=" + _bll.Model.Client.ToString()); } } }
protected void bt_Submit_Click(object sender, EventArgs e) { if ((int)ViewState["TelephoneID"] != 0) { string _title = ""; CM_PropertyInTelephoneBLL _bll = new CM_PropertyInTelephoneBLL((int)ViewState["TelephoneID"]); NameValueCollection dataobjects = new NameValueCollection(); dataobjects.Add("ID", _bll.Model.ID.ToString()); if (_bll.Model.Client > 0) { CM_Client _c = new CM_ClientBLL(_bll.Model.Client).Model; if (_c != null) { dataobjects.Add("ClientID", _bll.Model.Client.ToString()); dataobjects.Add("ClientName", _c.FullName); _title += _c.FullName; } } dataobjects.Add("TeleNumber", _bll.Model.TeleNumber.ToString()); dataobjects.Add("TeleCost", _bll.Model.TeleCost.ToString("0.##")); dataobjects.Add("NetCost", _bll.Model.NetCost.ToString("0.##")); #region 组织任务标题 _title += "电话号码:" + _bll.Model.TeleNumber; #endregion int TaskID = EWF_TaskBLL.NewTask("CM_PropertyInTelephone_Flow", (int)Session["UserID"], _title, "~/SubModule/CM/PD/PropertyInTelephoneDetail.aspx?TelephoneID=" + _bll.Model.ID.ToString(), dataobjects); if (TaskID > 0) { _bll.Model.State = 2; _bll.Model.ApproveTask = TaskID; _bll.Update(); new EWF_TaskBLL(TaskID).Start(); //直接启动流程 } Response.Redirect("~/SubModule/EWF/TaskDetail.aspx?TaskID=" + TaskID.ToString()); } }
protected void bt_Install_Click(object sender, EventArgs e) { if ((int)ViewState["TelephoneID"] != 0) { CM_PropertyInTelephoneBLL _bll = new CM_PropertyInTelephoneBLL((int)ViewState["TelephoneID"]); pl_detail.GetData(_bll.Model); if (_bll.Model.TeleNumber == "") { MessageBox.Show(this, "请正确输入安装的电话号码!"); return; } _bll.Model.State = 4; //已安装状态 _bll.Model.UpdateStaff = (int)Session["UserID"]; if (_bll.Update() == 0) { MessageBox.ShowAndRedirect(this, "成功将该电话设为安装状态!", "PropertyDetail.aspx?ClientID=" + _bll.Model.Client.ToString()); } } }