protected override void OnDataSet() { if (!Objectbase.IsNullOrEmpty(this.mOpdTreatmentProcedure)) { this.mOpdTreatmentProcedure.OPDTreatmentDate = this.dptTreatmentDate.Value; // treatment this.mPatient.OPDTreatmentProcedure = this.mOpdTreatmentProcedure; this.mOpdTreatmentProcedure.OPDTreatments.Clear(); for (int i = 0; i < cmbTreatment.Items.Count; i++) { if (cmbTreatment.GetItemChecked(i)) { obj = new OPDTreatmentProcedureTreatment(); Guid gd = new Guid(cmbTreatment.Items[i].ToString()); obj.PatientGuid = this.mPatient.ObjectGuid; obj.TreatmentGuid = gd; this.mOpdTreatmentProcedure.OPDTreatments.Add(obj); } } for (int i = 0; i < cmbTreatment.Items.Count; i++) { if (cmbTreatment.GetItemChecked(i)) { cmbTreatment.SetItemChecked(i, false); } } } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mPatientBill)) { if (counter == 0) { this.mPatientBill.Patient = cmbPatient.SelectedItem as Patient; this.mPatientBill.Other = txtOtherPatientName.Text.Trim(); this.mPatientBill.PatientBillDate = dtpBillDate.Value; counter = 1; } if (this.cmbCategory.SelectedItem != null) { this.mEntry.Category = this.cmbCategory.SelectedItem as Category; this.mEntry.Company = this.cmbCompany.SelectedItem as Company; this.mEntry.Item = this.cmbItem.SelectedItem as Item; this.mEntry.Quantity = this.nupQuantity.Value; this.mEntry.Amount = nupAmount.Value; this.mEntry.Note = txtNotes.Text; this.mPatientBill.PatientMedicineSale = this.mEntry; } } }
protected override bool OnDataValidation() { bool r = true; if (this.dtpProcedureDate.Text.Trim().Length <= 0) { this.ShowTooltip(this.dtpProcedureDate, "Procedure Date", "Procedure date is required", ContentAlignment.TopRight); if (r) { this.dtpProcedureDate.Select(); } r = false; } if (Objectbase.IsNullOrEmpty(this.cmbProcedure.SelectedItem as Procedure)) { this.ShowTooltip(this.cmbProcedure, "Procedure", "Procedure is required", ContentAlignment.TopRight); if (r) { this.cmbProcedure.Select(); } r = false; } if (nupAmount.Value <= 0) { this.ShowTooltip(this.nupAmount, "Amount", "Amount is required", ContentAlignment.TopRight); if (r) { this.nupAmount.Select(); } r = false; } return(r && base.OnDataValidation()); }
protected override void OnDataShow() { base.OnDataShow(); bool IsIPD = true; Patients patient = new Patients(IsIPD); this.cmbPatientName.DataSource = patient; this.cmbPatientName.DisplayMember = "DisplayName"; if (!Objectbase.IsNullOrEmpty(this.mEntry)) { //this.mEntry.Patient = mPatient; this.cmbPatientName.SelectedItem = this.mEntry.DisplayName; this.cmbPatientName.SelectedItem = this.mEntry.Patient != null ? this.mEntry.Patient as Patient : null; this.cmbTime.SelectedItem = this.mEntry.Time; this.txtBP.Text = this.mEntry.BP; this.txtHR.Text = this.mEntry.HR; this.txtRR.Text = this.mEntry.RR; this.txtTemp.Text = this.mEntry.Temp; this.txtRBS.Text = this.mEntry.RBS; this.txtECG.Text = this.mEntry.ECG; this.txtWeight.Text = this.mEntry.Weight; this.txtHeight.Text = this.mEntry.Height; this.txtOther.Text = this.mEntry.Other; this.txtSPO2.Text = this.mEntry.SPO2; this.txtPULSE.Text = this.mEntry.PULSE; if (!string.IsNullOrEmpty(this.mEntry.Date.ToString()) && (this.mEntry.Date != DateTime.MinValue)) { this.dtpDate.Value = this.mEntry.Date; } this.cmbPatientName.Select(); } }
protected override void OnDataShow() { base.OnDataShow(); CategoryCollection categoryList = new CategoryCollection(); this.cmbCategory.DataSource = categoryList; this.cmbCategory.DisplayMember = "DisplayName"; this.cmbCategory.Select(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.CheckPermission(); if (!this.mEntry.IsNew) { this.cmbCategory.Enabled = this.cmbCompany.Enabled = this.cmbItem.Enabled = false; } this.cmbCategory.SelectedItem = this.mEntry.Category as Category; this.cmbCompany.SelectedItem = this.mEntry.Company as Company; this.cmbItem.SelectedItem = this.mEntry.Item as Item; this.cmbBillType.SelectedIndex = !string.IsNullOrEmpty(this.mEntry.BillType) ? cmbBillType.FindStringExact(this.mEntry.BillType.ToString()) : 0; this.nupQuantity.Value = this.mEntry.Quantity; this.nupWholeSaleRate.Value = this.mEntry.WholesaleRate; this.numAmount.Value = this.mEntry.Amount; if (!string.IsNullOrEmpty(this.mEntry.ExpiryDate.ToString()) && (this.mEntry.ExpiryDate != DateTime.MinValue)) { this.dtpExpiryDate.Value = mEntry.ExpiryDate; } this.numMRP.Value = this.mEntry.MRP; } }
protected override void OnDataShow() { base.OnDataShow(); if (!Objectbase.IsNullOrEmpty(this.mPatientBill)) { this.CheckPermission(); if (this.mPatientBill.Patient != null) { if (this.mPatientBill.Patient.IsIPD) { this.cmbPatientType.SelectedItem = "I.P.D"; } else if (this.mPatientBill.Patient.IsOPD) { this.cmbPatientType.SelectedItem = "O.P.D"; } else { this.cmbPatientType.SelectedItem = "Other"; } } this.cmbPatient.SelectedItem = this.mPatientBill.Patient != null ? this.mPatientBill.Patient as Patient : null; this.txtOtherPatientName.Text = this.mPatientBill.Other; this.dtpBillDate.Value = this.mPatientBill.PatientBillDate != DateTime.MinValue ? this.mPatientBill.PatientBillDate : DateTime.Now.Date; } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.LoginName = this.txtLoginName.Text; this.mEntry.Name = this.txtName.Text; this.mEntry.AddressLine1 = this.txtAddress1.Text; this.mEntry.AddressLine2 = this.txtAddress2.Text; this.mEntry.AddressLine3 = this.txtAddress3.Text; this.mEntry.PhoneNo = this.txtPhoneNo.Text; this.mEntry.MobileNo = this.txtMobileNo.Text; if (this.mEntry.IsNew || AppContext.IsAdministrator) { this.mEntry.UserRole = this.cmbUserRole.SelectedItem as UserRole; } this.mEntry.Photo = this.imgPhoto.Image == null ? null : Common.BytesToImage(this.imgPhoto.Image); this.mEntry.Description = this.txtDesc.Text; if (this.mEntry.IsOpen) { this.mEntry.IsDisabled = this.chkIsDisable.Checked; } } }
protected override void OnDataSet() { if (!Objectbase.IsNullOrEmpty(this.mOPDPrescription)) { this.mOPDPrescription.Doseage = this.txtDoseage.Text; this.mOPDPrescription.Timings = this.txtTimings.Text; this.mOPDPrescription.OPDPrescriptionDate = this.dptPrescriptionDate.Value; //Medicine this.mPatient.OPDPrescription = this.mOPDPrescription; this.mOPDPrescription.OPDMedicines.Clear(); for (int i = 0; i < cmbMedicine.Items.Count; i++) { if (cmbMedicine.GetItemChecked(i)) { obj = new OPDPrescriptionProcedureMedicine(); Guid gd = new Guid(cmbMedicine.Items[i].ToString()); obj.PatientGuid = this.mPatient.ObjectGuid; obj.MedicineGuid = gd; this.mOPDPrescription.OPDMedicines.Add(obj); } } for (int i = 0; i < cmbMedicine.Items.Count; i++) { if (cmbMedicine.GetItemChecked(i)) { cmbMedicine.SetItemChecked(i, false); } } } }
public ObjectbaseForm(Objectbase obj, bool isPostUpdate) { this.mEntity = obj; this.mIsPostUpdate = isPostUpdate; this.InitializeComponent(); this.lblTitle.Font = Common.ApplicationTitleFont; this.lblTitle.ForeColor = Common.LightTextColor; this.btnDelete.Enter += new EventHandler(this.OnControlEnter); this.btnDelete.Leave += new EventHandler(this.OnControlLeave); this.btnSave.Enter += new EventHandler(this.OnControlEnter); this.btnSave.Leave += new EventHandler(this.OnControlLeave); this.btnCancel.Enter += new EventHandler(this.OnControlEnter); this.btnCancel.Leave += new EventHandler(this.OnControlLeave); this.picTitle.Image = Common.ApplicationIcon.ToBitmap(); this.Icon = Common.ApplicationIcon; this.Font = Common.ApplicationFont; //this.btnSave.Visible = this.CanEdit || this.CanCreate; }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.CategoryName = txtCategoryName.Text.Trim(); } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.Name = txtMainInvestigation.Text.Trim(); this.mEntry.Description = txtMainInvestigationDesc.Text.Trim(); } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.Type = txtRoomType.Text.Trim(); this.mEntry.Description = txtRoomDesc.Text.Trim(); } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.Name = txtHistoryOfProblem.Text.Trim(); this.mEntry.Description = txtHistoryOfProblemDesc.Text.Trim(); } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.Name = txtMedicine.Text; this.mEntry.Description = txtDescription.Text; } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.Category = cmbCategory.SelectedItem as Category; this.mEntry.CompanyName = txtCompanyName.Text.Trim(); } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.Name = txtAssociateComplain.Text.Trim(); this.mEntry.Description = txtAssociateComplainDesc.Text.Trim(); } }
protected override void OnDataShow() { base.OnDataShow(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { //this.c this.txtCategoryName.Text = this.mEntry.CategoryName; this.txtCategoryName.Select(); } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mPatientBill)) { this.mPatientBill.Patient = cmbPatient.SelectedItem as Patient; this.mPatientBill.Other = txtOtherPatientName.Text.Trim(); this.mPatientBill.PatientBillDate = dtpBillDate.Value; } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.AppointmentDate = this.dtpAppointmentDate.Value; this.mEntry.AppointmentDescription = this.txtAppointmentDescription.Text; this.mPatient.Appointment = this.mEntry; } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.chiefcomplain = this.cmbChiefComplain.SelectedItem as ChiefComplain; this.mEntry.Name = txtTreatment.Text; this.mEntry.Description = txtDescription.Text; } }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.Name = txtName.Text.Trim(); this.mEntry.Share = nupShare.Value; this.mEntry.Description = txtDesc.Text.Trim(); } }
protected override void OnDataShow() { base.OnDataShow(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.CheckPermission(); UserRoles roleList = new UserRoles(); this.cmbUserRole.DisplayMember = "DisplayName"; this.cmbUserRole.DataSource = roleList; this.cmbUserRole.SelectedItem = cmbUserRole.Items[0]; if (!this.mEntry.IsNew && (!AppContext.IsAdministrator)) { this.txtLoginName.ReadOnly = true; this.txtName.Select(); this.cmbUserRole.SelectedItem = this.mEntry.UserRole; } if (this.mEntry.IsNew) { this.lblWindowsUserName.Visible = false; this.txtWindowsUserName.Visible = false; } //this.cmbUserRole.SelectedItem = this.mEntry.UserRole; this.txtLoginName.Text = this.mEntry.LoginName; this.txtName.Text = this.mEntry.Name; this.txtAddress1.Text = this.mEntry.AddressLine1; this.txtAddress2.Text = this.mEntry.AddressLine2; this.txtAddress3.Text = this.mEntry.AddressLine3; this.txtPhoneNo.Text = this.mEntry.PhoneNo; this.txtMobileNo.Text = this.mEntry.MobileNo; this.txtDesc.Text = this.mEntry.Description; this.txtWindowsUserName.Text = this.mEntry.WindowsUserName; this.chkIsDisable.Checked = this.mEntry.IsDisabled; //this.chkIsDisable.Visible = this.mEntry.IsOpen; bool hasPhoto = this.mEntry.Photo != null; if (hasPhoto) { this.imgPhoto.Image = Common.ImageFromBytes(this.mEntry.Photo); } this.btnRemovePhoto.Visible = hasPhoto; if (this.mEntry.IsLoggedIn) { this.Text = string.Format("Profile of {0}", this.mEntry.Name); this.chkIsDisable.Visible = false; this.btnDelete.Visible = false; this.btnSave.Visible = true; } this.txtLoginName.Select(); } }
protected override void OnDataShow() { base.OnDataShow(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { //this.c this.txtHistoryOfProblem.Text = this.mEntry.Name; this.txtHistoryOfProblemDesc.Text = this.mEntry.Description; this.txtHistoryOfProblem.Select(); } }
protected override void OnDataShow() { base.OnDataShow(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { //this.c this.txtAssociateComplain.Text = this.mEntry.Name; this.txtAssociateComplainDesc.Text = this.mEntry.Description; this.txtAssociateComplain.Select(); } }
protected override void OnDataShow() { base.OnDataShow(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.CheckPermission(); this.txtName.Text = this.mEntry.Name; this.txtDesc.Text = this.mEntry.Description; this.txtName.Select(); } }
protected override void OnDataShow() { base.OnDataShow(); this.btnDelete.Visible = false; if (!Objectbase.IsNullOrEmpty(this.mUserRole)) { this.Text = "Permission To " + this.mUserRole.DisplayName; this.dgvData.AutoGenerateColumns = false; this.dgvData.DataSource = mUserPermissions; } }
protected override void OnDataShow() { base.OnDataShow(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { //this.c this.txtMainInvestigation.Text = this.mEntry.Name; this.txtMainInvestigationDesc.Text = this.mEntry.Description; this.txtMainInvestigation.Select(); } }
public static bool ShowForm(Patient obj) { bool r = false; if (!Objectbase.IsNullOrEmpty(obj)) { using (OPDInvestigationForm frm = new OPDInvestigationForm(obj)) { r = frm.ShowDialog() == DialogResult.OK; } } return(r); }
public static bool ShowForm(User obj) { bool r = false; if (!Objectbase.IsNullOrEmpty(obj)) { using (UserForm frm = new UserForm(obj)) { r = frm.ShowDialog() == DialogResult.OK; } } return(r); }
protected override void OnDataSet() { base.OnDataSet(); if (!Objectbase.IsNullOrEmpty(this.mEntry)) { this.mEntry.Haste = this.txtHaste.Text.ToString(); this.mEntry.Category = cmbCategory.SelectedItem as Category; this.mEntry.Company = cmbCompany.SelectedItem as Company; this.mEntry.Item = cmbItem.SelectedItem as Item; this.mEntry.Quantity = this.nupQuantity.Value; this.mEntry.Amount = this.nupAmount.Value; } }