protected void SellsView_Click(object sender, EventArgs e) { MultiView1.SetActiveView(SellsView); }
protected void BtnSave_Click(object sender, EventArgs e) { try { if (ddlPatient.SelectedIndex == 0) { lblMsg.Text = "Please Select Patient Name"; ddlPatient.Focus(); return; } else { if ((Convert.ToDecimal(txtPayAmount.Text).CompareTo(Convert.ToDecimal(txtTotal.Text)) == 1) || (Convert.ToDecimal(txtPayAmount.Text).CompareTo(Convert.ToDecimal(txtTotal.Text)) == -1)) { lblMsg.Text = "Please Enter Proper Full Amount"; txtPayAmount.Text = string.Empty; txtPayAmount.Focus(); return; } else { if (IsCheque.Checked) { if (string.IsNullOrEmpty(txtChequeNo.Text)) { lblMsg.Text = "Please Enter Cheque Number"; txtChequeNo.Focus(); return; } else if (string.IsNullOrEmpty(txtChequeDate.Text)) { lblMsg.Text = "Please Enter Cheque Date"; txtChequeDate.Focus(); return; } else { if (string.IsNullOrEmpty(txtBankName.Text)) { lblMsg.Text = "Please Enter Bank Name"; txtBankName.Focus(); return; } } } else { List <EntityCustomerTransaction> lst = new List <EntityCustomerTransaction>(); EntityCustomerTransaction entcust = new EntityCustomerTransaction(); entcust.PatientId = Convert.ToInt32(ddlPatient.SelectedValue); entcust.EmpName = Convert.ToString(Session["AdminName"]); entcust.ReceiptDate = Convert.ToDateTime(txtTransactDate.Text); entcust.BillRefNo = Convert.ToString(txtBillRefNo.Text); entcust.PayAmount = Convert.ToDecimal(0); if (IsCash.Checked) { entcust.IsCash = true; entcust.ISCheque = false; entcust.IsCard = false; entcust.IsRTGS = false; entcust.BillAmount = Convert.ToDecimal(txtTotal.Text); } if (IsCheque.Checked) { entcust.ChequeDate = Convert.ToDateTime(txtChequeDate.Text); entcust.ChequeNo = Convert.ToString(txtChequeNo.Text); entcust.BankName = Convert.ToString(txtBankName.Text); entcust.BillAmount = Convert.ToDecimal(txtTotal.Text); } if (IsCard.Checked) { entcust.IsCash = false; entcust.ISCheque = false; entcust.IsCard = true; entcust.IsRTGS = false; entcust.BankRefNo = Convert.ToString(txtBankRefNo.Text); entcust.BillAmount = Convert.ToDecimal(txtTotal.Text); } if (IsRTGS.Checked) { entcust.IsCash = false; entcust.ISCheque = false; entcust.IsCard = false; entcust.IsRTGS = true; entcust.BankRefNo = Convert.ToString(txtBankRefNo.Text); entcust.BillAmount = Convert.ToDecimal(txtTotal.Text); } int i = new AdvancePaymentBLL().Save(entcust, IsCash.Checked); if (i > 0) { lblMessage.Text = "Record Saved Successfully"; } else { lblMessage.Text = "Record Not Saved"; } } } } } catch (Exception ex) { lblMessage.Text = ex.Message; } GetCustTransactionList(); MultiView1.SetActiveView(View2); }
protected void Button9_Click(object sender, EventArgs e) { MultiView1.SetActiveView(View1); Label2.Visible = false; }
protected void btn_manImport_Click(object sender, EventArgs e) { lbl_error.Text = ""; string yrmo = ddlYrmo.SelectedItem.Text; HRAAdminBill hobj = new HRAAdminBill(); HRAImportDAL iObj = new HRAImportDAL(); string logFilePath = Server.MapPath("~/uploads/") + "Exceptions_WageworksInvoice_" + yrmo + ".txt"; if (Page.IsValid) { if (txtPrevYRMO.Visible) { lbl_error.Text = "Enter YRMO in format 'yyyymm'"; return; } string strFilePath1 = ""; if (FileUpload1.GotFile) { try { string fn = System.IO.Path.GetFileName(FileUpload1.FilePost.FileName); strFilePath1 = Server.MapPath("~/uploads/") + fn; if (File.Exists(strFilePath1)) { File.Delete(strFilePath1); } FileUpload1.FilePost.SaveAs(strFilePath1); if (File.Exists(logFilePath)) { File.Delete(logFilePath); } iObj.Rollback(source, yrmo); _counter = hobj.ImportWgwkInvoice(strFilePath1, 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(strFilePath1)) { File.Delete(strFilePath1); } FileUpload1.FilePost.InputStream.Flush(); FileUpload1.FilePost.InputStream.Close(); FileUpload1.FilePost.InputStream.Dispose(); } } } }
protected void Btnsubmit_Click(object sender, EventArgs e) { string dest = ""; bool flag = true; txttype.Visible = true; Worker_Info w_info = new Worker_Info(); Worker_Sp w_sp = new Worker_Sp(); w_info.Worker_Name = txtname.Text; w_info.Work_Category = txttype.SelectedValue; w_info.Licence_No = txtid.Text; w_info.Adress = txtaddress.Text; string imagepath = ""; Boolean fileOK = false; String path = Server.MapPath("~/Photos/workers/"); if (FileUpload1.HasFile) { String fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName).ToLower(); String[] allowedExtensions = { ".gif", ".png", ".jpeg", ".jpg" }; for (int i = 0; i < allowedExtensions.Length; i++) { if (fileExtension == allowedExtensions[i]) { fileOK = true; } } } if (fileOK) { try { imagepath = path + FileUpload1.FileName; FileUpload1.PostedFile.SaveAs(imagepath); FileInfo f = new FileInfo(imagepath); dest = new Worker_Sp().GetMaxCode() + "." + f.Name.Split('.')[1]; if (flag == true) { f.CopyTo(path + dest); w_info.Worker_Photo = dest; w_sp.Add_Worker(w_info); GridView1.DataBind(); MultiView1.SetActiveView(View1); } f = new FileInfo(imagepath); f.Delete(); } catch (Exception ex) { lbfile.Text = "File could not be uploaded!!."; lbfile.Visible = true; } } else { lbfile.Text = "Cannot accept files of this type!!."; lbfile.Visible = true; } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void CreateUserWizardStep1_CreateUserError(object sender, EventArgs e) { //show RegisterView to see error MultiView1.SetActiveView(RegisterView); }
protected void Page_Load(object sender, EventArgs e) { string qishuS; SupperUserInfo su = (SupperUserInfo)Session["userInfor"]; Database db = new Database(); string time = dt.ToString("yyyyMMdd"); //用于期数的年月日 string time0 = dt.ToShortDateString(); //用于给javascript的截止时间的年月日 long time1 = GetTimeStamp(); long todayStamp = time1 % (24 * 60 * 60 * 1000); if (todayStamp < 30 * 60 * 1000) { qishu = 59; } else if (todayStamp < (3 * 60 * 60 * 1000 + 11 * 60 * 1000)) { int qishuNum = (int)(todayStamp - 30 * 60 * 1000) / (20 * 60 * 1000) + 1; qishu = qishuNum; } else if (todayStamp < (7 * 60 * 60 * 1000 + 30 * 60 * 1000)) { qishu = 9; } else { int qishuNum1 = (int)(todayStamp - (7 * 60 * 60 * 1000 + 30 * 60 * 1000)) / (20 * 60 * 1000) + 10; qishu = qishuNum1; } if (qishu < 10) { qishuS = "00" + qishu; } else { qishuS = "0" + qishu; } currentQishu = "当前期数:第" + time + "-" + qishuS + "期";//显示当前期数号:年月日期数号 if (qishu == 59) { data = time0 + " 00:27:42"; } else if (qishu < 9) { int t0 = 27 * 60 + 52; //第一期截至时相对当天0时的秒数 int t_1 = 20 * 60; //每一期增加的秒数 int times = qishu; int totle = t0 + t_1 * times; int hour = totle / 3600; int min = totle % 3600 / 60; int sec = totle % 60; data = time0 + " " + hour + ":" + min + ":" + sec; } else { int t0 = 7 * 3600 + 27 * 60 + 52; //早上7:30开 int t_1 = 20 * 60; //每一期增加的秒数 int times = qishu - 9; int totle = t0 + t_1 * times; int hour = totle / 3600; int min = totle % 3600 / 60; int sec = totle % 60; data = time0 + " " + hour + ":" + min + ":" + sec; } //判断登陆 if (su.isLogin) { _Uid = su.Uid; userName = su.userName; netName = su.netName; _simpid = su.getsimpleUid(); _netNameLink = "<a href=\"/User/Default.aspx?Cid=" + _Uid + "&v=1\">" + su.netName + "[ID=" + _simpid + "]</a>"; _money = db.getContent("userInfo", "money", "userName", userName); _login = "******"/User/Default.Aspx?Cid = " + _Uid + " & amp; v=1\">我的地盘</a>"; _login1 = "<a href=\"/User/Default.Aspx?AC=Exit&Cid =" + _Uid + " & amp; v=1\">安全退出</a>"; int newsNum = db.getNewsNumber(_simpid);//获取当前用户未读消息条数 if (newsNum > 0) { _message = "[系统]<a href=\"/User/MyXin.aspx?LX=0&Cid=" + _Uid + "&v=1\">你有(" + newsNum + ")条未读消息!</a>"; } } string periodBet; string qishu0;//不带日期,但前面加0的期数 if (qishu == 59) { periodBet = dt.AddDays(1).ToString("yyyyMMdd") + "001"; } else { if (qishu < 9) { qishu0 = "00" + (qishu + 1); } else { qishu0 = "0" + (qishu + 1); } periodBet = time + qishu0;//显示当前投注期数号:年月日期数号 } if (db.isStopBet(periodBet, "cqsscResult"))//判断是否截止 { _stopOrSuccess = "本期已经截止!"; MultiView1.SetActiveView(View3); } else { if (Request["Ac"] == "Bet") { float peiLv;//赔率 if (int.Parse(Request["v"]) == 1) { if (Request["Multiple"] == "" || Request["P1"] == "") { MultiView1.SetActiveView(View1); } else { if (int.Parse(Request["P1"]) == 1) { _a = "单"; } else { _a = "双"; } peiLv = float.Parse(db.getContent("peiLvTable", "peiLv", "betType", "ssc", "peiLvType", "大小单双"));//获取赔率值 _b = Request["Multiple"]; int i = int.Parse(_b); winMoney = (i * peiLv).ToString(); if (!su.isLogin) { _d = "卵弹琴,你没有那么多金币,<a href=\"/User/Default.aspx?Cid=<%=_Uid %>\" >前去充值</ a>"; MultiView1.SetActiveView(View2); } else { if (float.Parse(db.getContent("userInfo", "money", "userName", userName)) < i) { _d = "卵弹琴,你没有那么多金币,<a href=\"/User/Default.aspx?Cid=<%=_Uid %>\" >前去充值</ a>"; MultiView1.SetActiveView(View2); } else { Session["position"] = _a; Session["money"] = _b; Session["winMoney"] = winMoney; _d = "<input type=\"submit\" class=\"submit\" value=\"立即下注\" >"; MultiView1.SetActiveView(View2); } } } } else if (int.Parse(Request["v"]) == 2)//V=2代表一切投注条件都满足了,包括余额充足 { _a = Session["position"].ToString(); _b = Session["money"].ToString();//总共费用 winMoney = Session["winMoney"].ToString(); //string period = DateTime.Now.ToString("yyyyMMdd") + qishu; int check = db.bet("cqssc", userName, netName, periodBet, _a, "总和大小", _b, "Bet", winMoney, DateTime.Now.ToString("yyyy-MM-dd h:mm:ss")); if (check == 1) { float moneys = float.Parse(db.getContent("userInfo", "money", "userName", userName)); float remainMoney = moneys - float.Parse(_b); db.updateContent("userInfo", "money", remainMoney.ToString(), "userName", su.userName); _stopOrSuccess = "恭喜你,下注成功!"; MultiView1.SetActiveView(View3); } } } else { MultiView1.SetActiveView(View1); } } string period0;//最近开奖的这期 if (qishu < 10) { qishuS = "00" + qishu; } else { qishuS = "0" + qishu; } period0 = time + qishuS; //最近开奖的这期 string resultball5 = db.getContent("cqsscResult", "resultBall", "period", period0); //获取五个球开奖结果 if (resultball5 != "") { string[] arr = resultball5.Split('-'); ball1 = arr[0]; ball2 = arr[1]; ball3 = arr[2]; ball4 = arr[3]; ball5 = arr[4]; _result = " <div >" + ball1 + "</div><div >" + ball2 + "</div><div >" + ball3 + "</div><div >" + ball4 + "</div><div >" + ball5 + "</div>"; } else { _result = " <div >摇</ div>"; } }
protected void BenchmarButton_Click(object sender, EventArgs e) { MultiView1.SetActiveView(BenchmarkView); }
protected void lnkRegUser_Click(object sender, EventArgs e) { MultiView1.SetActiveView(View1); //LoadGridLogin(); }
protected void ProgressButton_Click(object sender, EventArgs e) { MultiView1.SetActiveView(PerformanceView); }
protected void HistoryButton_Click(object sender, EventArgs e) { MultiView1.SetActiveView(HistoryView); }
protected void lnkshowchild_Click(object sender, EventArgs e) { //LoadGrid1(); MultiView1.SetActiveView(View2); MultiView1.Visible = true; }
protected void lnkAppReg_Click(object sender, EventArgs e) { MultiView1.SetActiveView(View1); loadGridApp(); }
protected void ProfitView_Click(object sender, EventArgs e) { MultiView1.SetActiveView(ProfitView); }
protected void RadioButtonList3_SelectedIndexChanged(object sender, EventArgs e) { MultiView1.SetActiveView(v_done); }
protected void Add_Save_Button_Command(object sender, CommandEventArgs e) { MySqlConnection dbconn = new MySqlConnection(CommonClass.connectionstring); dbconn.Open(); string lPhotoFileName = null; FileUpload lFileUpload1 = Product_Form_View.FindControl("FileUpload1") as FileUpload; if (lFileUpload1.HasFile) { Random lRandom = new Random(); lPhotoFileName = lRandom.Next().ToString() + lFileUpload1.FileName; lFileUpload1.SaveAs(Server.MapPath("~/img/" + lPhotoFileName)); } else if (Product_Form_View.CurrentMode == FormViewMode.Edit) { Image lImage1 = Product_Form_View.FindControl("Product_Image") as Image; if (lImage1.ImageUrl != "" && lImage1.ImageUrl != null) { string[] lImageUrgl = lImage1.ImageUrl.Split(new char[] { '/' }); lPhotoFileName = lImageUrgl[lImageUrgl.Length - 1]; } } string lProduct_Name = Server.HtmlEncode((Product_Form_View.FindControl("Product_Name") as TextBox).Text); string lProductId = null; if (Product_Form_View.CurrentMode == FormViewMode.Insert) { string[] lValues = CommonClass.ExecuteQuery("ADD_PRODUCT", new string[] { "P_PRODUCT_NAME", "P_PRODUCT_CATEGORY_ID", "P_PHOTO_FILE_NAME", "P_MEASUREMENT_ID", "P_SUMMARY", "P_HIGHLIGHT_TEXT" }, new string[] { lProduct_Name, (Product_Form_View.FindControl("PRODUCT_CATEGORY_ID") as DropDownList).SelectedValue.ToString(), lPhotoFileName, (Product_Form_View.FindControl("Measurement_Id") as DropDownList).SelectedValue.ToString(), Server.HtmlEncode((Product_Form_View.FindControl("SUMMARY") as Obout.Ajax.UI.HTMLEditor.Editor).Content), Server.HtmlEncode((Product_Form_View.FindControl("HIGHLIGHT_TEXT") as TextBox).Text) }, new string[] { "P_PRODUCT_ID" }, dbconn); lProductId = lValues[0]; } else { lProductId = Product_Form_View.DataKey.Values[0].ToString(); CommonClass.ExecuteQuery("UPDATE_PRODUCT", new string[] { "P_PRODUCT_ID", "P_PRODUCT_CATEGORY_ID", "P_PRODUCT_NAME", "P_MEASUREMENT_ID", "P_HIGHLIGHT_TEXT", "P_SUMMARY", "P_PHOTO_FILE_NAME" }, new string[] { lProductId, (Product_Form_View.FindControl("Product_Category_Id") as DropDownList).SelectedValue.ToString(), Server.HtmlEncode((Product_Form_View.FindControl("Product_Name") as TextBox).Text), (Product_Form_View.FindControl("Measurement_Id") as DropDownList).SelectedValue.ToString(), Server.HtmlEncode((Product_Form_View.FindControl("HIGHLIGHT_TEXT") as TextBox).Text), Server.HtmlEncode((Product_Form_View.FindControl("SUMMARY") as AjaxControlToolkit.HTMLEditor.Editor).Content), lPhotoFileName }, dbconn); } Refresh_Product_View(dbconn); dbconn.Close(); MultiView1.SetActiveView(Product_All_View); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void CreateUserWizardStep1_CreatedUser(object sender, EventArgs e) { // Create an empty Profile for the newly created user //ProfileCommon p = (ProfileCommon)ProfileCommon.Create(CreateUserWizard1.UserName, true); // Populate some Profile properties off of the create user wizard //p.FirstName = ((TextBox)CreateUserWizard1.CreateUserStep.Controls[0].FindControl("FirstName")).Text; //p.LastName = ((TextBox)CreateUserWizard1.CreateUserStep.Controls[0].FindControl("LastName")).Text; //load new membership user and set 'Comment' property to {FirstName}|{LastName} MembershipUser mu = String.IsNullOrEmpty(CreateUserWizard1.UserName) ? Membership.GetUser(CreateOpenIDWizard.UserName) : Membership.GetUser(CreateUserWizard1.UserName.Trim()); //approved = false by default if (mu != null) { //set approved mu.IsApproved = Website.Config.MembershipUserApprovedByDefault; string targetRole = "Users"; if (!Roles.IsUserInRole(mu.UserName, targetRole)) { Roles.AddUserToRole(mu.UserName, targetRole); } //create user profile UserProfile p = null; string memGUID = mu.ProviderUserKey.ToString().Trim(); string fName = ((TextBox)CreateUserWizard1.CreateUserStep.Controls[0].FindControl("FirstName")).Text; string lName = ((TextBox)CreateUserWizard1.CreateUserStep.Controls[0].FindControl("LastName")).Text; string email = ((TextBox)CreateUserWizard1.CreateUserStep.Controls[0].FindControl("Email")).Text; try { p = UserProfileDB.InsertUserProfile(memGUID, fName, lName, email, email, email); mu.Comment = p.FirstName.Trim() + "|" + p.LastName.Trim(); Membership.UpdateUser(mu); PermissionsManager mgr = new PermissionsManager(); mgr.AddUserToGroup(System.Configuration.ConfigurationManager.AppSettings["DefaultAdminName"], vwarDAL.DefaultGroups.AllUsers, mu.UserName); if (Website.Config.SendEmailForNewRegistrations) { Website.Mail.SendNewRegistrationNotificationEmail(mu); } mgr.Dispose(); } catch { } } // Save profile - must be done since we explicitly created it // p.Save(); if (Website.Config.MembershipUserApprovedByDefault == false) { //not approved FormsAuthentication.SignOut(); MultiView1.SetActiveView(ConfirmationView); } else { //approved FormsAuthentication.RedirectFromLoginPage(CreateUserWizard1.UserName, false); Website.Mail.SendRegistrationApprovalEmail(mu.Email); } }
protected void Cancel_Button_Click(object sender, EventArgs e) { MultiView1.SetActiveView(Product_All_View); Refresh_Product_View(); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void SwitchToOpenId(object sender, EventArgs e) { MultiView1.SetActiveView(OpenIdCreationView); }
protected void lnkMobileNoWise_Click(object sender, EventArgs e) { MultiView1.SetActiveView(View1); PopulateRootLevelM(); //LoadGridLogin(); }
protected void lnkStaffAbsenty_Click(object sender, EventArgs e) { MultiView1.SetActiveView(View2); //LoadGridLogin(); }
protected void Button6_Click(object sender, EventArgs e) //Apply Selection of Empid and date { MultiView1.SetActiveView(View2); SqlConnection con = new SqlConnection(strcon); SqlCommand cmd; String Mon = Convert.ToDateTime(ddlMonth.Text.ToString() + "/1/1900").ToString("MMMM"); String Dater = Mon + " " + ddlYear.Text; SqlDataReader read; String sql = "SELECT Employee.Employee_id, Employee.Name,Employee.Employee_Type, Employee.Designation, DEPT.dname, Employee.BasicSal, salary.reciptno, salary.hra, salary.bonus, salary.incentive, salary.da, salary.med, salary.nopaid, salary.paid, salary.Date FROM DEPT INNER JOIN Employee ON DEPT.deptid = Employee.deptid INNER JOIN salary ON Employee.Employee_id = salary.Employee_id where Employee.Employee_id=@eid AND salary.Date=@dt"; cmd = new SqlCommand(sql, con); cmd.Parameters.AddWithValue("@dt", Dater); cmd.Parameters.AddWithValue("@eid", DropDownList4.Text); Label20.Text = Dater.ToString(); con.Open(); read = cmd.ExecuteReader(); if (read.Read()) { Label2.Text = read["Name"].ToString(); Label3.Text = read["Employee_id"].ToString(); Label13.Text = read["reciptno"].ToString(); Label14.Text = read["dname"].ToString(); Label15.Text = read["Designation"].ToString(); Label21.Text = read["Employee_Type"].ToString(); decimal y = (decimal)read["BasicSal"]; decimal x, hra; Label4.Text = y.ToString("#.##"); if (read["hra"].ToString() != "0") { x = Convert.ToInt32(read["hra"].ToString()); hra = (x / 100m) * y; Label5.Text = hra.ToString("#.##"); } else { Label5.Text = "0"; } Label6.Text = read["med"].ToString(); if (read["da"].ToString() != "0") { x = Convert.ToInt32(read["da"].ToString()); hra = (x / 100m) * y; Label7.Text = hra.ToString("#.##"); } else { Label7.Text = "0"; } Label8.Text = read["bonus"].ToString(); Label9.Text = read["incentive"].ToString(); int m = Convert.ToInt32(read["paid"].ToString()); //Label19.Text = m.ToString(); if (m < 3) { if (m == 2) { Label19.Text = "0.00"; } else if (m == 1) { decimal p = (y / 30m); Label19.Text = p.ToString("#.##"); } else { decimal p = (y / 30m) * 2m; Label19.Text = p.ToString("#.##"); } } else { Label19.Text = "0.00"; } decimal total = y + decimal.Parse(Label5.Text.ToString()) + decimal.Parse(Label7.Text.ToString()) + decimal.Parse(Label6.Text.ToString()) + decimal.Parse(Label8.Text.ToString()) + decimal.Parse(Label9.Text.ToString()); Label10.Text = total.ToString("#.##"); //total allowances decimal pf = (y * (12m / 100m)) + decimal.Parse(Label7.Text.ToString()); lblpf.Text = pf.ToString("#.##"); decimal unpai = (y / 30m) * decimal.Parse(read["nopaid"].ToString()); lblunpl.Text = unpai.ToString("#.##"); decimal utotal = pf + unpai; Label11.Text = utotal.ToString("#.##"); //total dedections decimal sal = total - utotal; Label12.Text = sal.ToString("#.##"); //Net Salary read.Close(); con.Close(); } }
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 gvAlbums_RowDeleted(object sender, GridViewDeletedEventArgs e) { gvAlbums.DataBind(); MultiView1.DataBind(); }
protected void btn_xldetails_Click(object sender, EventArgs e) { string yrmo = ddlYrmo.SelectedItem.Text; DataSet ds = new DataSet(); DataSet dsFinal = new DataSet(); dsFinal.Clear(); string filename = "DFRF_matched_mismatched_Details_" + yrmo; string[][] cols = { new string[] { "YRMO", "DCN", "Anthem Claims Amount", "DFRF Amount", "Variance" }, new string[] { "YRMO", "DCN", "Anthem Claims Amount", "DFRF Amount", "Variance" }, new string[] { "YRMO", "DCN", "Subscriber ID", "Paid Date", "DFRF Amount" }, new string[] { "YRMO", "DCN", "Subscriber ID", "Paid Date", "Anthem Claims Amount" }, new string[] { "Type", "Record Count", "Dups Count", "Total Count" } }; string[][] colsFormat = { new string[] { "string", "string", "decimal", "decimal", "decimal" }, new string[] { "string", "string", "decimal", "decimal", "decimal" }, new string[] { "string", "string", "string", "string", "decimal" }, new string[] { "string", "string", "string", "string", "decimal" }, new string[] { "string", "string", "string", "string" } }; string[] sheetnames = { "Matched_Records", "Mismatched_Records", "DFRF_with_no_matching_Anthem", "Anthem_with_no_matching_DFRF", "Records_Summary" }; string[] titles = { "DFRF Reconciliation Matched Records by DCN and Amount for " + yrmo, "DFRF Reconciliation Mismatched Records by Amount for " + yrmo, "DCN Records in DF/RF not in Anthem Claims for " + yrmo, "DCN records in Anthem Claims not in DF/RF for " + yrmo, "Summary of records from Anthem DF Report & DFRF Report for " + yrmo }; try { ds = ReconDAL.getMatchedDCNAmnt(yrmo, "Matched"); ds.Tables[0].TableName = "matchedTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[0].TableName = "matchedTableF"; ds.Clear(); ds = ReconDAL.getMatchedDCNAmnt(yrmo, "UnMatched"); ds.Tables[0].TableName = "mismatchedTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[1].TableName = "mismatchedTableF"; ds.Clear(); ds = ReconDAL.getRFDFUM(yrmo); ds.Tables[0].TableName = "unmatch_DFRFTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[2].TableName = "unmatch_DFRFTableF"; ds.Clear(); ds = ReconDAL.getClaimsUM(yrmo); ds.Tables[0].TableName = "unmatch_AnthTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[3].TableName = "unmatch_AnthTableF"; ds.Clear(); ds = RecordCount.SummaryRecordsFinal(yrmo); ds.Tables[0].TableName = "summRecords"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[4].TableName = "summRecordsF"; ds.Clear(); ExcelReport.ExcelXMLRpt(dsFinal, filename, sheetnames, titles, cols, colsFormat); } catch (Exception ex) { MultiView1.SetActiveView(view_main); lbl_error.Text = "Error in generating excel report" + ex.Message; } }
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_Wageworks_" + 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 BtnClose_Click(object sender, EventArgs e) { MultiView1.SetActiveView(View2); }
protected void Button1_Click(object sender, EventArgs e) { MultiView1.SetActiveView(v_default); }
protected void Button3_Click(object sender, EventArgs e) { MultiView1.SetActiveView(View3); }
protected void CatagoryEditView_Click(object sender, EventArgs e) { MultiView1.SetActiveView(CatagoryEditView); }