private void btnAddSMSTemplet_Click(object sender, EventArgs e) { try { string error = string.Empty; string Templet = TxtSMSTemplet.Text.ToStr(); if (Templet == "") { error += "Required : Templet"; } if (!string.IsNullOrEmpty(error)) { ENUtils.ShowMessage(error); return; } GridViewRowInfo row = null; if (grdSMSTemplets.CurrentRow != null) { row = grdSMSTemplets.CurrentRow; } else { row = grdSMSTemplets.Rows.AddNew(); } row.Cells[COL_SMSTEMPLET.Tempplet].Value = Templet; ClearTemplet(); TxtSMSTemplet.Select(); } catch (Exception ex) { ENUtils.ShowErrorMessage(ex.Message); } }
private void frmDrivertemplet_Load(object sender, EventArgs e) { try { FormatSMSTempletGrid(); Gen_SysPolicy obj = General.GetQueryable <Gen_SysPolicy>(null).FirstOrDefault(); if (obj != null) { objMaster.GetByPrimaryKey(obj.Id); Display(); if (grdSMSTemplets.Rows.Count > 0) { //grdSMSTemplets.Rows[0].IsCurrent = true; //grdSMSTemplets.CurrentRow = null; } } TxtSMSTemplet.Select(); } catch { } }
private void frmDrivertemplet_Shown(object sender, EventArgs e) { TxtSMSTemplet.Select(); }
private void ClearTemplet() { TxtSMSTemplet.Text = string.Empty; grdSMSTemplets.CurrentRow = null; TxtSMSTemplet.Select(); }