protected void btnDeletetemp_Command(object sender, CommandEventArgs e) { string id = e.CommandArgument.ToString(); WX.CRM.ContactTemp.MODEL contact = WX.CRM.ContactTemp.GetModel("SELECT * FROM CRM_ContactTemp WHERE ContactID=" + id); int row; if (contact == null) { contact = WX.CRM.ContactTemp.GetModel("SELECT * FROM CRM_Contact WHERE ID=" + id); contact.ContactID.value = id; contact.State.value = -1; row = contact.Insert(); } else { contact.State.value = -1; contact.CheckState.value = 0; row = contact.Update(); } if (row > 0) { WX.CRM.Customer.MODEL customer = WX.CRM.Customer.NewDataModel(contact.CustomerID.ToString()); WX.CRM.Customer.AddLog(customer.ID.ToInt32(), customer.CustomerName.ToString(), WX.Main.CurUser.UserID, 10, "申请删除(" + contact.ContactName.ToString() + ")"); WX.Main.AddLog(WX.LogType.Default, "客户联系人信息删除申请!", null); ULCode.Debug.Alert("删除信息申请成功!", "Crm_Single_AddContact.aspx?PageMode=" + Request["PageMode"] + "&Action=Add&CustomerID=" + WX.Request.rCustomerID); } else { ULCode.Debug.Alert("删除信息申请失败!", "Crm_Single_AddContact.aspx?PageMode=" + Request["PageMode"] + "&Action=Add&CustomerID=" + WX.Request.rCustomerID); } }
protected void Button2_Click(object sender, EventArgs e) { WX.CRM.ContactTemp.MODEL contacttemp = WX.CRM.ContactTemp.NewDataModel(Request["ContactTempID"]); WX.CRM.Customer.MODEL customer = WX.CRM.Customer.NewDataModel(contacttemp.CustomerID.ToString()); contacttemp.CheckState.set(-1); contacttemp.CheckUserID.value = WX.Main.CurUser.UserID; contacttemp.Update(); mes = "butsumit();"; WX.CRM.Customer.AddLog(customer.ID.ToInt32(), customer.CustomerName.ToString(), WX.Main.CurUser.UserID, 5, "未通过"); }