public HRAStep9(HRA HRA, int HRAID) { InitializeComponent(); if (Device.RuntimePlatform == "Android") { ToolbarItems.Add(new ToolbarItem("Home", "crosswhite.png", () => { App.Current.MainPage = new NavigationPage(new HealthRiskAssesment()) { BarBackgroundColor = Color.FromHex("#f44337"), BarTextColor = Color.White }; })); } else { ToolbarItems.Add(new ToolbarItem("X", "", () => { App.Current.MainPage = new NavigationPage(new HealthRiskAssesment()) { BarBackgroundColor = Color.FromHex("#f44337"), BarTextColor = Color.White }; })); } pkrPregnent.ItemsSource = lstCommonDropDown; pkrbreastfeed.ItemsSource = lstCommonDropDown; pkrmesuration.ItemsSource = lstCommonDropDown; pkrmenopause.ItemsSource = lstCommonDropDown; hraid = HRAID; objHRA = HRA; if (HRA != null) { if (HRA.data.female_specific != null) { objFemaleSpecific = HRA.data.female_specific; ShowData(); } } }
/// <summary> /// On click of button get selected Game from list and pass its params to Main ViewModel /// and close this window /// </summary> /// <param name="param">Selected game HRA</param> private void SelectGame() { HRA hra = Selected; int oblastID = (int)hra.oblast; MainVM main = Application.Current.MainWindow.DataContext as MainVM; main.OblastID = oblastID; main.GenerateGrid(); Application.Current.Windows.OfType <ContinueWindow>().First().Close(); }
protected void ddlQYList() { HRA iobj = new HRA(); string prevQY; for (int i = 0; i < 4; i++) { prevQY = iobj.getPrevQY(i); ddlQY.Items.Add(prevQY); } ddlQY.Items.Add("New Quarter-Year"); }
protected void ddlYrmoList() { HRA iobj = new HRA(); string prevYRMO; for (int i = 0; i < 6; i++) { prevYRMO = iobj.getPrevYRMO(i); ddlYrmo.Items.Add(prevYRMO); } ddlYrmo.Items.Add("New Yrmo"); }
public HRAStep6(HRA HRA, int HRAID) { InitializeComponent(); pkrExercise.ItemsSource = lstCommonDropDown; hraid = HRAID; objHRA = HRA; if (HRA != null) { if (HRA.data.fitness != null) { objFitness = HRA.data.fitness; ShowData(); } } }
public HRAStep7(HRA HRA, int HRAID) { InitializeComponent(); pkrlesstime.ItemsSource = lstCommonDropDown; pkrSatisfy.ItemsSource = lstCommonDropDown; Hraid = HRAID; objHRA = HRA; if (HRA != null) { if (HRA.data.stress != null) { objStress = HRA.data.stress; ShowData(); } } }
public HRAStep3(HRA HRA, int HRAID) { InitializeComponent(); HRAid = HRAID; objHRA = HRA; lstCommonDropDown.Add(new CommonDropDowns(1, "Yes")); lstCommonDropDown.Add(new CommonDropDowns(0, "No")); lstCommonDropDown.Add(new CommonDropDowns(2, "Don't Know")); BindValues(); if (HRA != null) { if (HRA.data.family_history != null) { objFamilyHistory = HRA.data.family_history; ShowData(); } } }
public HRAStep2(HRA HRA) { InitializeComponent(); objHRA = HRA; if (HRA != null) { HRAid = objHRA.data.id; if (HRA.data.investigations != null) { objInvestigations = objHRA.data.investigations; ShhowData(); } } else { btnSave.IsEnabled = false; } }
public HRAStep4(HRA HRA, int HRAID) { InitializeComponent(); pkrhighbloodpressure.ItemsSource = lstCommonDropDown; pkrHighCholestrol.ItemsSource = lstCommonDropDown; pkrDiabetes.ItemsSource = lstCommonDropDown; pkrAnaemia.ItemsSource = lstCommonDropDown; pkrdigestiveProblems.ItemsSource = lstCommonDropDown; pkrFrequentAllergies.ItemsSource = lstCommonDropDown; pkPainJoints.ItemsSource = lstCommonDropDown; pkFrequentHeadaches.ItemsSource = lstCommonDropDown; pkSleepDisorders.ItemsSource = lstCommonDropDown; pkSkinProblems.ItemsSource = lstCommonDropDown; pkHeartProblems.ItemsSource = lstCommonDropDown; //pkrhighbloodpressure.SelectedIndex = 0; //pkrHighCholestrol.SelectedIndex = 0; //pkrDiabetes.SelectedIndex = 0; //pkrAnaemia.SelectedIndex = 0; //pkrdigestiveProblems.SelectedIndex = 0; //pkrFrequentAllergies.SelectedIndex = 0; //pkPainJoints.SelectedIndex = 0; //pkFrequentHeadaches.SelectedIndex = 0; //pkSleepDisorders.SelectedIndex = 0; //pkSkinProblems.SelectedIndex = 0; //pkHeartProblems.SelectedIndex = 0; Hraid = HRAID; if (HRA != null) { objHra = HRA; if (HRA.data.personal_health != null) { objPersonalHealth = HRA.data.personal_health; showData(); } } }
public HRAStep8(HRA HRA, int HRAID) { InitializeComponent(); pkrChew.ItemsSource = lstCommonDropDown; pkrSmoke.ItemsSource = lstCommonDropDown; pkealcohol.ItemsSource = lstCommonDropDown; hraid = HRAID; objHra = HRA; if (HRA != null) { if (HRA.data.habits != null) { objHabits = HRA.data.habits; ShowData(); } } }
public HRAStep5(HRA HRA, int HRAID) { InitializeComponent(); pkrmealstimely.ItemsSource = lstCommonDropDown; pkrmealsfrequently.ItemsSource = lstCommonDropDown; pkrHeavyDinner.ItemsSource = lstCommonDropDown; objHRA = HRA; Hraid = HRAID; if (HRA != null) { if (HRA.data.nutrition != null) { objNutrition = HRA.data.nutrition; ShowData(); } } }
protected void autoImport() { if (HRAImportDAL.CheckAutoImport(_category, source)) { upload_auto.Visible = true; upload_manually.Visible = false; lbl_clientfile.Text = HRAImportDAL.GetClientFilePath(_category, source) + "\\" + HRA.GetInputFileName(ddlYrmo1.SelectedItem.Value, source); } else { upload_auto.Visible = false; upload_manually.Visible = true; lbl_clientfile.Text = ""; } }
protected void btn_autoImport_Click(object sender, EventArgs e) { HRASofoDAL robj = new HRASofoDAL(); Impersonation _imp = new Impersonation(); string yrmo = ddlYrmo1.SelectedItem.Text; string clientfilename, clientfile, serverPath; string serverfile = ""; div1_error.Visible = false; div1_alert.Visible = false; if (Page.IsValid) { if (txtPrevYRMO1.Visible) { lbl_error1.Text = "Enter YRMO in format 'yyyymm'"; return; } try { serverPath = Server.MapPath("~/uploads/"); clientfilename = HRA.GetInputFileName(yrmo, source); serverfile = serverPath + clientfilename; if (_imp.impersonateValidUser(Session["uid"].ToString(), "CORP", EncryptDecrypt.Decrypt(Session["pwd"].ToString()))) { clientfile = HRAImportDAL.GetClientFilePath(_category, source) + "\\" + clientfilename; File.Copy(clientfile, serverfile); _imp.undoImpersonation(); } else { throw new Exception("Error in accessing network location"); } if (!(File.Exists(serverfile))) { throw new Exception("Unable to import file from specified location.<br/>Please check if file exists and you are logged in to the network."); } AutoReconcile(serverfile); HRA_Results.SavePrintFiles(_category, yrmo); viewresult1(yrmo); Session["taskId"] = Convert.ToInt32(Session["taskId"]) + 1; Audit.auditUserTaskR(Session.SessionID, Session["mid"].ToString(), Session["taskId"].ToString(), "HRA", "Reconciliation", "SOFO Reconciliation", yrmo); } catch (Exception ex) { MultiView3.SetActiveView(view_main1); robj.ReconDelete(yrmo); div1_error.Visible = true; lbl_error1.Text = "Error - " + ex.Message; } finally { if (File.Exists(serverfile)) { File.Delete(serverfile); } } } }
/// <summary> /// Refresh Time information about game /// </summary> /// <param name="source">Source of event</param> /// <param name="e">Param of event</param> private void OnTimedEvent(object source, ElapsedEventArgs e) { HRA hra = DBHelper.GetGame(this.OblastID); this.Time = hra.Time; }
protected void btn_autoImport_Click(object sender, EventArgs e) { HRAAdminBill hobj = new HRAAdminBill(); Impersonation _imp = new Impersonation(); HRAImportDAL iobj = new HRAImportDAL(); string yrmo = ddlYrmo.SelectedItem.Text; string clientfilename, clientfile, serverPath; string serverfile = ""; lbl_error.Text = ""; string logFilePath = Server.MapPath("~/uploads/") + "Exceptions_WageworksInvoice_" + yrmo + ".txt"; if (Page.IsValid) { if (txtPrevYRMO.Visible) { lbl_error.Text = "Enter YRMO in format 'yyyymm'"; return; } try { serverPath = FilePaths.getFilePath("Uploads").Replace("\\\\", "\\"); clientfilename = HRA.GetInputFileName(yrmo, source); serverfile = serverPath + clientfilename; if (_imp.impersonateValidUser(Session["uid"].ToString(), "CORP", EncryptDecrypt.Decrypt(Session["pwd"].ToString()))) { clientfile = HRAImportDAL.GetClientFilePath(_category, source) + "\\" + clientfilename; File.Copy(clientfile, serverfile); _imp.undoImpersonation(); } else { throw new Exception("Error in accessing network location"); } if (!(File.Exists(serverfile))) { throw new Exception("Unable to copy file from specified location.<br/>Please check if file exists and you are logged in to the network."); } if (File.Exists(logFilePath)) { File.Delete(logFilePath); } iobj.Rollback(source, yrmo); _counter = hobj.ImportWgwkInvoice(serverfile, source, yrmo); if (File.Exists(logFilePath)) { resultDiv.Visible = true; } Session["taskId"] = Convert.ToInt32(Session["taskId"]) + 1; Audit.auditUserTaskI(Session.SessionID, Session["mid"].ToString(), Session["taskId"].ToString(), "HRA", "Administrative Bill Validation", "hra_PartDataInvoice", "Wageworks Invoice Import", yrmo, _counter); MultiView1.SetActiveView(view_result); lbl_result.Text = "Import completed successfully -- " + _counter + " records imported"; } catch (Exception ex) { if (File.Exists(logFilePath)) { File.Delete(logFilePath); } resultDiv.Visible = false; iobj.Rollback(source, yrmo); lbl_error.Text = "Error - " + ex.Message; } finally { if (File.Exists(serverfile)) { File.Delete(serverfile); } } } }
protected void btn_autoImport_Click(object sender, EventArgs e) { HRAImportDAL iobj = new HRAImportDAL(); Impersonation _imp = new Impersonation(); string yrmo = ddlYrmo.SelectedItem.Text; string clientfilename, clientfile, serverPath; string serverfile = ""; lbl_error.Text = ""; string logFilePath = Server.MapPath("~/uploads/") + "Exceptions_PutnamAdj_" + yrmo + ".txt"; if (Page.IsValid) { if (txtPrevYRMO.Visible) { lbl_error.Text = "Enter YRMO in format 'yyyymm'"; return; } try { serverPath = FilePaths.getFilePath("Uploads").Replace("\\\\", "\\"); clientfilename = HRA.GetInputFileName(yrmo, source); serverfile = serverPath + clientfilename; if (_imp.impersonateValidUser(Session["uid"].ToString(), "CORP", EncryptDecrypt.Decrypt(Session["pwd"].ToString()))) { clientfile = HRAImportDAL.GetClientFilePath(_category, source) + "\\" + clientfilename; if (!File.Exists(clientfile)) { clientfile = clientfile.Replace(".xls", ".txt"); serverfile = serverfile.Replace(".xls", ".txt"); } File.Copy(clientfile, serverfile); _imp.undoImpersonation(); } else { throw new Exception("Error in accessing network location"); } if (!(File.Exists(serverfile))) { throw new Exception("Unable to import file from specified location.<br/>Please check if file exists and you are logged in to the network."); } if (ImportFile(serverfile)) { MultiView1.SetActiveView(view_result); lbl_result.Text = "Import completed successfully -- " + _counter + " records imported"; } else { throw new Exception("Unable to parse file.<br/>Please check file type and format."); } } catch (Exception ex) { if (File.Exists(logFilePath)) { File.Delete(logFilePath); } resultDiv.Visible = false; iobj.Rollback(source, yrmo); lbl_error.Text = "Error - " + ex.Message; } finally { if (File.Exists(serverfile)) { File.Delete(serverfile); } } } }
protected void autoImport() { if (HRAImportDAL.CheckAutoImport(_category, source)) { upload_auto.Visible = true; upload_manually.Visible = false; lbl_clientfile.Text = HRAImportDAL.GetClientFilePath(_category, source) + "\\" + HRA.GetInputFileName(ddlYrmo.SelectedItem.Value, source); lbl_clientfile.Text = lbl_clientfile.Text + " (<i>or</i>)<br/>" + lbl_clientfile.Text.Replace(".xls", ".txt"); } else { upload_auto.Visible = false; upload_manually.Visible = true; lbl_clientfile.Text = ""; } }