protected void btnSubmite_Click(object sender, EventArgs e) { if (Page.IsValid) { try { if (ID > 0) { smsTempletModel _EmailTemplate = new smsTempletModel(); _EmailTemplate.ID = ID; _EmailTemplate.Name = ddlTemplate.Text; _EmailTemplate.smsText = txtMessage.Text; _EmailTemplate.ModifiedUser = UserName; int retID = client.UpdatesmsTemplate(_EmailTemplate); if (retID > 0) { ShowMessage(ref lblMessage, MessageType.Success, "Temlate Save Successfully."); BindTempletList(); ClearControl(); } else { ShowMessage(ref lblMessage, MessageType.Danger, "System facing Some issues to Save Temlate."); } } } catch (Exception ex) { ShowMessage(ref lblMessage, MessageType.Danger, "Error:" + ex.Message); } lblMessage.Visible = true; } }
protected void ddlTemplate_SelectedIndexChanged(object sender, EventArgs e) { ID = Convert.ToInt32(ddlTemplate.SelectedItem.Value); smsTempletModel ObjList = client.GetEmailTemplateByID(ID, ParlourId); ID = 0; txtMessage.Text = string.Empty; if (ObjList != null) { ID = ObjList.ID; txtMessage.Text = ObjList.smsText; } }
public void PaymentRemindersms(MembersPaymentDetailsModel model) { if (model.pkiMemberID > 0) { //Member New Registration Welcome SMS Send int SmsGrupId = Convert.ToInt32(SmsGroupType.Payment); smsSendingGroupModel modelSSG = client.GetsmsGroupbyID(SmsGrupId, ParlourId); if (modelSSG != null) { StringBuilder strsb = new StringBuilder(); smsTempletModel _EmailTemplate = client.GetEmailTemplateByID(SmsGrupId, ParlourId); if (_EmailTemplate != null) { MembersModel objMemberModel = client.GetMemberByID(model.pkiMemberID, ParlourId); strsb = new StringBuilder(_EmailTemplate.smsText); strsb = strsb.Replace("@Name", "<p>" + objMemberModel.FullNames + " " + objMemberModel.Surname + "</p>"); strsb = strsb.Replace("@DatePayment", "<p>" + model.PaymentDate + "</p>"); strsb = strsb.Replace("@NextDatePayment", "<p>" + model.Notes + "</p>"); strsb = strsb.Replace("@Paymentby", "<p>" + model.MethodOfPayment + "</p>"); string CellNo = (objMemberModel.Cellphone == string.Empty ? "0" : objMemberModel.Cellphone); if (CellNo == "0") { CellNo = (objMemberModel.Telephone == string.Empty ? "0" : objMemberModel.Telephone); } SendReminderModel smsModel = new SendReminderModel(); smsModel.MemeberID = UserID.ToString(); smsModel.MemberData = strsb.ToString(); smsModel.MemeberToNumber = Convert.ToInt64(CellNo.Replace(" ", "")); smsModel.parlourid = ParlourId; int SendOpration = client.InsertSendReminder(smsModel); } } } }
public static int UpdatesmsTemplate(smsTempletModel model) { return(ToolsSetingDAL.UpdatesmsTemplate(model)); }