public static ClsCallingList GetByCallingListID(int ID) { try { ClsCallingList obj = new ClsCallingList(); DataSet ds = new CallingList.DataAccess.ClsCallingListDataService().CallingList_GetByID(ID); if (!obj.MapData(ds)) { obj = null; } return(obj); } catch (Exception ex) { VMuktiHelper.ExceptionHandler(ex, "GetByCallingListID", "ClsCalllingList.cs"); return(null); } }
public static ClsCallingList GetByCallingListID(int ID) { try { ClsCallingList obj = new ClsCallingList(); DataSet ds = new CallingList.DataAccess.ClsCallingListDataService().CallingList_GetByID(ID); if (!obj.MapData(ds)) obj = null; return obj; } catch (Exception ex) { VMuktiHelper.ExceptionHandler(ex, "GetByCallingListID", "ClsCalllingList.cs"); return null; } }
private void btnSave_Click(object sender, System.Windows.RoutedEventArgs e) { try { //CallingList Name Validation if (txtName.Text.Trim() == "") { System.Windows.MessageBox.Show("CallingList Name can't be left blank", "-> Please Enter a Name", MessageBoxButton.OK, MessageBoxImage.Information); txtName.Focus(); txtName.Text = txtName.Text.Trim(); return; } ClsCallingList c = new ClsCallingList(); if (varState == 0) c.ID = -1; else c.ID = varID; c.ListName = txtName.Text.TrimEnd(' ').TrimStart(' '); c.IsActive = (bool)chkIsActive.IsChecked; c.IsDNCList = (bool)chkIsDNCList.IsChecked; c.CreatedBy = VMuktiAPI.VMuktiInfo.CurrentPeer.ID; Int64 gID = c.Save(); if (gID == 0) { System.Windows.MessageBox.Show("Duplicate List Name Is Not Allowed !!", "-> Calling List", MessageBoxButton.OK, MessageBoxImage.Information); } else { System.Windows.MessageBox.Show("Record Saved Successfully!!"); funSetGrid(); FncClearAll(); } } catch (Exception ex) { VMuktiHelper.ExceptionHandler(ex, "btnSave_Click", "ctlCalllingList.xaml.cs"); } }