private void LiveSaveInfo() { if (LiveFormIsValid()) { myU = new UserInfo(); myU.UserID = UserInfo.LiveUserID; myU.Password = txtOldPassword.Text.Trim(); if (myU.IsLoginUser()) { myU.Password = txtConfirmPassword.Text.Trim(); if (myU.EditPassword()) { Interactive.LInfo("Your password has been changed", "Change password"); LiveClearControls(); this.Close(); } } else { Interactive.LInfoError("Old password is wrong", "Change password"); txtOldPassword.SelectAll(); } } else { Interactive.LInfoError(err, string.Empty); } }
private void LiveSaveInfo() { if (LiveFormIsValid()) { myR = new RoleInfo(); myR.RoleID = txtRoleID.Text.Trim(); myR.Description = txtDescription.Text.Trim(); if (EditFlag) { myR.RoleID = lblID.Text.Trim(); myR.NewRoleID = txtRoleID.Text.Trim(); if ((Interactive.LInfoConfirm("Are you sure you want to Edit ?", "") == DialogResult.Yes)) { if (myR.Edit()) { Interactive.LInfo("Information saved successfully", ""); LiveLoad(); } } } else { if (myR.Add()) { Interactive.LInfo("Information saved successfully", ""); LiveLoad(); } } } else { Interactive.LInfoError(err, string.Empty); } }
public bool NewPublicHoliday() { bool ok = false; if (AddPublicHoliday() > 0) { ok = true; Interactive.LInfo("PublicHoliday added successfully", "New PublicHoliday"); } return(ok); }
public bool EditAppointment() { bool ok = false; if (UpdateAppointment() > 0) { ok = true; Interactive.LInfo("Appointment Updated successfully", "Edit Appointment"); } return(ok); }
public bool NewAppointment() { bool ok = false; if (AddAppointment() > 0) { ok = true; Interactive.LInfo("Appointment added successfully", "New Appointment"); } return(ok); }
public bool RemoveClassification() { bool ok = false; if (DeleteClassification() > 0) { ok = true; Interactive.LInfo("Classification Deleted successfully", "Delete Classification"); } return(ok); }
public bool EditClassification() { bool ok = false; if (UpdateClassification() > 0) { ok = true; Interactive.LInfo("Classification Updated successfully", "Edit Classification"); } return(ok); }
//public ListView lvClassificationSearch(ListView lv,string strSc) //{ // myr = GetAllClassifications().Select(strSc, "Zone ASC"); // lv.Items.Clear(); // ListViewItem l; // foreach (DataRow r in myr) // { // l = new ListViewItem(); // l.Text = r["Fcode"].ToString(); // l.SubItems.Add(r["Classification"].ToString()); // l.SubItems.Add(r["Zone"].ToString()); // l.SubItems.Add(r["ZoneID"].ToString()); // l.SubItems.Add(r["Sector"].ToString()); // l.SubItems.Add(r["District"].ToString()); // l.SubItems.Add(r["Province"].ToString()); // lv.Items.Add(l); // } // return lv; //} public bool NewClassification() { bool ok = false; if (AddClassification() > 0) { ok = true; Interactive.LInfo("Classification added successfully", "New Classification"); } return(ok); }
public bool RemovePublicHoliday() { bool ok = false; if (DeletePublicHoliday() > 0) { ok = true; Interactive.LInfo("PublicHoliday Deleted successfully", "Delete PublicHoliday"); } return(ok); }
public bool EditPublicHoliday() { bool ok = false; if (UpdatePublicHoliday() > 0) { ok = true; Interactive.LInfo("PublicHoliday Updated successfully", "Edit PublicHoliday"); } return(ok); }
public bool RemoveAppointment() { bool ok = false; if (DeleteAppointment() > 0) { ok = true; Interactive.LInfo("Appointment Deleted successfully", "Delete Appointment"); } return(ok); }
public bool RemoveFacility() { bool ok = false; if (DeleteFacility() > 0) { ok = true; Interactive.LInfo("Facility Deleted successfully", "Delete Facility"); } return(ok); }
//public ListView lvFacility(ListView lv, string strFind) //{ // myr = GetAllFacilitys().Select("Facility LIKE '" + strFind.Trim() + "%'", "Facility ASC"); // lv.Items.Clear(); // ListViewItem l; // foreach (DataRow r in myr) // { // l = new ListViewItem(); // l.Text = r["Facility"].ToString(); // l.SubItems.Add(r["Description"].ToString()); // lv.Items.Add(l); // } // return lv; //} //public ListView lvFacility(ListView lv, string strColumn, string SortOrder) //{ // myr = GetAllFacilitys().Select("", strColumn + " " + SortOrder); // lv.Items.Clear(); // ListViewItem l; // foreach (DataRow r in myr) // { // l = new ListViewItem(); // l.Text = r["Fcode"].ToString(); // l.SubItems.Add(r["Facility"].ToString()); // l.SubItems.Add(r["Zone"].ToString()); // l.SubItems.Add(r["ZoneID"].ToString()); // l.SubItems.Add(r["Sector"].ToString()); // l.SubItems.Add(r["District"].ToString()); // l.SubItems.Add(r["Province"].ToString()); // lv.Items.Add(l); // } // return lv; //} //public ComboBox cmbFacility(ComboBox cmb) //{ // // cmb.Items.Clear(); // cmb.BeginUpdate(); // cmb.DataSource = GetAllFacilitys(); // cmb.DisplayMember = "Facility"; // cmb.ValueMember = "Fcode"; // cmb.EndUpdate(); // return cmb; //} //public ComboBox cmbFullFacility(ComboBox cmb) //{ // // cmb.Items.Clear(); // cmb.BeginUpdate(); // cmb.DataSource = GetAllFacilitys(); // cmb.DisplayMember = "FullFacility"; // cmb.ValueMember = "Fcode"; // cmb.EndUpdate(); // return cmb; //} //public ListBox lstFacility(ListBox lst) //{ // lst.BeginUpdate(); // lst.DataSource = GetAllFacilitys(); // lst.DisplayMember = "Facility"; // lst.ValueMember = "Facility"; // lst.EndUpdate(); // return lst; //} //public ListView lvFacilitySearchSort(ListView lv, string strSc, string strColumn, string SortOrder) //{ // myr = GetAllFacilitys().Select(strSc, strColumn+" "+SortOrder); // lv.Items.Clear(); // ListViewItem l; // foreach (DataRow r in myr) // { // l = new ListViewItem(); // l.Text = r["Fcode"].ToString(); // l.SubItems.Add(r["Facility"].ToString()); // l.SubItems.Add(r["Zone"].ToString()); // l.SubItems.Add(r["ZoneID"].ToString()); // l.SubItems.Add(r["Sector"].ToString()); // l.SubItems.Add(r["District"].ToString()); // l.SubItems.Add(r["Province"].ToString()); // lv.Items.Add(l); // } // return lv; //} //public ListView lvFacilitySearch(ListView lv,string strSc) //{ // myr = GetAllFacilitys().Select(strSc, "Zone ASC"); // lv.Items.Clear(); // ListViewItem l; // foreach (DataRow r in myr) // { // l = new ListViewItem(); // l.Text = r["Fcode"].ToString(); // l.SubItems.Add(r["Facility"].ToString()); // l.SubItems.Add(r["Zone"].ToString()); // l.SubItems.Add(r["ZoneID"].ToString()); // l.SubItems.Add(r["Sector"].ToString()); // l.SubItems.Add(r["District"].ToString()); // l.SubItems.Add(r["Province"].ToString()); // lv.Items.Add(l); // } // return lv; //} //public TreeView tvProvinceDistrictZone(TreeView tv,string x) //{ // DataRow[] Prw; // DataRow[] Drw; // DataRow[] Zrw; // Prw = ProvinceBLL.GetAllProvinces().Select("", "Province ASC"); // TreeNode t; // TreeNode t1; // TreeNode t2; // foreach (DataRow r in Prw) // { // t = tv.Nodes.Add(r["Province"].ToString()); // Drw = DistrictBLL.GetAllDistrictsByPcode(Convert.ToInt32(r["Pcode"].ToString())).Select("", "District ASC"); ; // foreach (DataRow r2 in Drw) // { // t.Nodes.Add(r2["District"].ToString() + " [" + r2["Dcode"].ToString() + "]"); // Zrw = ZoneBLL.GetAllZonesByDcode(Convert.ToInt32(r2["Dcode"].ToString())).Select("", "Zone ASC"); ; // foreach (DataRow r3 in Zrw) // { // t = t.Nodes.Add(r3["Zone"].ToString() + " [" + r3["ZoneID"].ToString() + "]"); // } // } // } // return tv; //} //public TreeView tvProvinceDistrictZone(TreeView tv) //{ // DataRow[] Prw; // DataRow[] Drw; // DataRow[] Zrw; // TreeNode t1; // TreeNode t2; // TreeNode t3; // Prw = ProvinceBLL.GetAllProvinces().Select("", "Province ASC"); // foreach (DataRow r in Prw) // { // t1=tv.Nodes.Add(r["Province"].ToString()); // Drw = DistrictBLL.GetAllDistrictsByPcode(Convert.ToInt32(r["Pcode"].ToString())).Select("", "District ASC"); ; // foreach (DataRow r2 in Drw) // { // t2=t1.Nodes.Add(r2["District"].ToString() + " [" + r2["Dcode"].ToString() + "]"); // Zrw = ZoneBLL.GetAllZonesByDcode(Convert.ToInt32(r2["Dcode"].ToString())).Select("", "Zone ASC"); ; // foreach (DataRow r3 in Zrw) // { // t3=t2.Nodes.Add(r3["Zone"].ToString() + " [" + r3["ZoneID"].ToString() + "]"); // } // } // } // return tv; //} public bool NewFacility() { bool ok = false; if (AddFacility() > 0) { ok = true; Interactive.LInfo("Facility added successfully", "New Facility"); } return(ok); }
public bool EditFacility() { bool ok = false; if (UpdateFacility() > 0) { ok = true; Interactive.LInfo("Facility Updated successfully", "Edit Facility"); } return(ok); }
public bool RemoveReserve() { bool ok = false; if (DeleteReserve() > 0) { ok = true; Interactive.LInfo("Reserve Deleted successfully", "Delete Reserve"); } return(ok); }
public bool EditReserve() { bool ok = false; if (UpdateReserve() > 0) { ok = true; Interactive.LInfo("Reserve Updated successfully", "Edit Reserve"); } return(ok); }
public bool NewReserve() { bool ok = false; if (AddReserve() > 0) { ok = true; Interactive.LInfo("Reserve added successfully", "New Reserve"); } return(ok); }
private void LiveDeleteInfo() { if ((Interactive.LInfoWarning("Are you sure you want to Delete ?", "") == DialogResult.Yes)) { myR = new RoleInfo(); myR.RoleID = lblID.Text.Trim(); if (myR.Remove()) { Interactive.LInfo("Information deleted successfully", ""); LiveLoad(); } return; } }
private void LiveSaveInfo() { if (LiveFormIsValid()) { myU = new UserInfo(); myU.UserID = txtUserID.Text.Trim(); myU.FullName = txtName.Text.Trim(); myU.RoleID = cmbRole.SelectedValue.ToString().Trim(); myU.IsActive = chkIsActive.Checked; if (EditFlag) { myU.UserID = lblID.Text.Trim(); myU.NewUserID = txtUserID.Text.Trim(); if ((Interactive.LInfoConfirm("Are you sure you want to Edit ?", "") == DialogResult.Yes)) { if (myU.Edit()) { Interactive.LInfo("Information saved successfully", ""); LiveLoad(); } } } else if (EditFlagPass) { myU.Password = txtConfirmPass.Text.Trim(); if (myU.EditPassword()) { Interactive.LInfo("Information saved successfully", ""); LiveLoad(); } } else { myU.Password = txtConfirmPass.Text.Trim(); if (myU.Add()) { Interactive.LInfo("Information saved successfully", ""); LiveLoad(); } } } else { Interactive.LInfoError(err, string.Empty); } }
private void LiveAdd() { if (lblReg.Text.Trim().Length == 0) { Interactive.LInfo("Select Patient from list first", "No Patient Selected"); return; } ClearControls(); EnableControls(true); btnNew.Enabled = false; btnSave.Enabled = true; btnEdit.Enabled = false; btnDelete.Enabled = false; if (lvAppointments.Items.Count > 0) { //dtpAvialDate.MinDate = MinAppointmentdate = Convert.ToDateTime(lvAppointments.Items[0].Text); //dtpVisitDate.MinDate = MinVisitDate = Convert.ToDateTime(lvAppointments.Items[0].SubItems[1].Text); } dtpVisitDate.Checked = true; }