private void init() { Song.Entities.SmsMessage sms = Business.Do <ISMS>().GetSingle(id); if (sms == null) { return; } if (sms.Sms_Type == 1) { this.Response.Redirect("smsSend.aspx?sortid=" + sms.Sms_SendId + "&smsid=" + sms.SMS_Id); } if (sms.Sms_Type == 2) { this.Response.Redirect("SMSSendSingle.aspx?id=" + sms.Sms_SendId + "&smsid=" + sms.SMS_Id); } if (sms.Sms_Type == 3) { this.Response.Redirect("SMSSendSingle.aspx?empid=" + sms.Sms_SendId + "&smsid=" + sms.SMS_Id); } if (smsid > -1) { Song.Entities.SmsMessage tm = Business.Do <ISMS>().GetSingle(smsid); tbContext.Text = tm.Sms_Context; } }
/// <summary> /// 删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void DeleteEvent(object sender, EventArgs e) { //如果是垃圾箱,直接删除 if (box == 3) { string keys = GridView1.GetKeyValues; foreach (string id in keys.Split(',')) { Business.Do <ISMS>().MessageDelete(Convert.ToInt16(id)); } BindData(null, null); } //如果是已发送,或草稿 if (box == 1 || box == 2) { string keys = GridView1.GetKeyValues; foreach (string id in keys.Split(',')) { Song.Entities.SmsMessage sms = Business.Do <ISMS>().GetSingle(Convert.ToInt16(id)); sms.Sms_MailBox = 3; Business.Do <ISMS>().MessageSave(sms); } BindData(null, null); } }
/// <summary> /// 设置初始界面 /// </summary> private void fill() { if (addrid > -1) { Song.Entities.AddressList addr = Business.Do <IAddressList>().AddressSingle(addrid); if (addr != null) { lbName.Text = addr.Adl_Name; lbMobile.Text = addr.Adl_MobileTel; lbCompany.Text = addr.Adl_Company; } } if (empid > -1) { Song.Entities.EmpAccount ea = Business.Do <IEmployee>().GetSingle(empid); lbName.Text = ea.Acc_Name; lbMobile.Text = ea.Acc_MobileTel; lbCompany.Text = ea.Dep_CnName; } if (smsid > -1) { Song.Entities.SmsMessage tm = Business.Do <ISMS>().GetSingle(smsid); tbContext.Text = tm.Sms_Context; } }