protected void btnAuothOpen_Click(object sender, ImageClickEventArgs e) { try { DataRow orderDate = SellersBLL.GetSelerOrderDate(Users.Nick); if (orderDate != null) { if (orderDate["OrderVersion"].Equals("体验版")) { Response.Redirect("http://crm.new9channel.com/version/versionTip.aspx"); return; } if (AppCusBLL.CheckAppCusIsExit(Users.Nick)) { ITopClient client = TBManager.GetClient(); TmcUserCancelRequest req = new TmcUserCancelRequest(); req.Nick = Users.Nick; TmcUserCancelResponse response = client.Execute(req); if (response.IsSuccess) { AppCusBLL.DeleteSellerNifty(Users.Nick); btnAuothOpen.ImageUrl = "~/Images/rate/closed.png"; } else { lberror.Text = response.ErrMsg; } } else { ITopClient client = TBManager.GetClient(); TmcUserPermitRequest req = new TmcUserPermitRequest(); TmcUserPermitResponse response = client.Execute(req, Users.SessionKey); AppCustomer appCus = null; if (response.IsSuccess) { appCus = new AppCustomer(); appCus.Status = "1"; appCus.Nick = Users.Nick; appCus.Created = DateTime.Now.ToShortDateString(); AppCusBLL.AddAppCus(appCus); btnAuothOpen.ImageUrl = "~/Images/rate/2open.png"; } else { lberror.Text = response.ErrMsg; } } btnAuothOpen.Width = Unit.Pixel(80); btnAuothOpen.Height = Unit.Pixel(25); } } catch (Exception ex) { ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Web_UI); } }
private void OpenMsgService() { ITopClient client = TBManager.GetClient(); TmcUserPermitRequest req = new TmcUserPermitRequest(); TmcUserPermitResponse response = client.Execute(req, Users.SessionKey); AppCustomer appCus = null; if (response.IsSuccess) { appCus = new AppCustomer(); appCus.Status = "1"; appCus.Nick = Users.Nick; appCus.Created = DateTime.Now.ToShortDateString(); AppCusBLL.AddAppCus(appCus); } }
public static void StartNotify() { if (!AppCusBLL.CheckAppCusIsExit(Users.Nick)) { ITopClient client = TBManager.GetClient(); TmcUserPermitRequest req = new TmcUserPermitRequest(); TmcUserPermitResponse response = client.Execute(req, Users.SessionKey); AppCustomer appCus = null; if (response.IsSuccess) { appCus = new AppCustomer(); appCus.Status = "1"; appCus.Nick = Users.Nick; appCus.Created = DateTime.Now.ToShortDateString(); AppCusBLL.AddAppCus(appCus); } } }