protected void btn_autoImport_Click(object sender, EventArgs e) { HRAAdminBill hobj = new HRAAdminBill(); Impersonation _imp = new Impersonation(); HRAImportDAL iobj = new HRAImportDAL(); string _qy = ddlQY.SelectedItem.Text; string clientfilename, clientfile, serverPath; string serverfile = ""; lbl_error.Text = ""; string logFilePath = Server.MapPath("~/uploads/") + "Exceptions_PutnamParticipantData_" + _qy + ".txt"; if (Page.IsValid) { if (txtPrevQY.Visible) { lbl_error.Text = "Enter Quarter-Year in format 'Qd-yyyy'"; return; } try { serverPath = FilePaths.getFilePath("Uploads").Replace("\\\\", "\\"); clientfilename = HRA.GetInputFileName(_qy, 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, _qy); _counter = hobj.ImportPtnmPartData(serverfile, source, _qy); 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", "Putnam Participant Data Import", _qy, _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, _qy); lbl_error.Text = "Error - " + ex.Message; } finally { if (File.Exists(serverfile)) { File.Delete(serverfile); } } } }
protected void LBVolver_Click(object sender, EventArgs e) { ActivarConsulta(false); MultiView1.SetActiveView(ViewNuevo); }
protected void btn_manImport_Click(object sender, EventArgs e) { lbl_error.Text = ""; HRAAdminBill hobj = new HRAAdminBill(); string _qy = ddlQY.SelectedItem.Text; HRAImportDAL iObj = new HRAImportDAL(); string logFilePath = Server.MapPath("~/uploads/") + "Exceptions_PutnamParticipantData_" + _qy + ".txt"; if (Page.IsValid) { if (txtPrevQY.Visible) { lbl_error.Text = "Enter Quarter-Year in format 'Qd-yyyy'"; 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, _qy); _counter = hobj.ImportPtnmPartData(strFilePath1, source, _qy); 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", "Putnam Participant Data Import", _qy, _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, _qy); 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 add_Click(object sender, EventArgs e) { MultiView1.SetActiveView(View2); save.Text = "SAVE"; }
protected void Page_Load(object sender, EventArgs e) { akun.Text = Session["user"].ToString(); if (akun.Text != "") { pass = Session["Pass"].ToString(); dt = ctrl.Cartt(akun.Text, pass); countCart.Text = dt.Rows[0]["count_cart"].ToString(); MultiView1.SetActiveView(View1); } else { MultiView1.SetActiveView(View2); } dt = ctrl.getProdukPembeli("Baru"); if (dt.Rows.Count > 0) { for (int i = 0; i < 5; i++) { if (i == 0 && dt.Rows[0]["nama_produk"].ToString() != null) { kategori1.Text = dt.Rows[0]["nama_kategori"].ToString(); new1.Text = dt.Rows[0]["nama_produk"].ToString(); newImg1.ImageUrl = dt.Rows[0]["gambar"].ToString(); price1.Text = dt.Rows[0]["harga_jual"].ToString(); kode = dt.Rows[0]["kode_produk"].ToString(); status = "pending"; } //if (i == 1 && dt.Rows[i]["nama_produk"].ToString() != null) //{ // kategori2.Text = dt.Rows[i]["nama_kategori"].ToString(); // new2.Text = dt.Rows[i]["nama_produk"].ToString(); // newImg2.ImageUrl = dt.Rows[i]["gambar"].ToString(); // price2.Text = dt.Rows[i]["harga_jual"].ToString(); //} //if (i == 2 && dt.Rows[i]["nama_produk"].ToString() != null) //{ // kategori3.Text = dt.Rows[i]["nama_kategori"].ToString(); // new3.Text = dt.Rows[i]["nama_produk"].ToString(); // newImg3.ImageUrl = dt.Rows[i]["gambar"].ToString(); // price3.Text = dt.Rows[i]["harga_jual"].ToString(); //} //if (i == 3 && dt.Rows[i]["nama_produk"].ToString() != null) //{ // kategori4.Text = dt.Rows[i]["nama_kategori"].ToString(); // new4.Text = dt.Rows[i]["nama_produk"].ToString(); // newImg4.ImageUrl = dt.Rows[i]["gambar"].ToString(); // price4.Text = dt.Rows[i]["harga_jual"].ToString(); //} //if (i == 4 && dt.Rows[i]["nama_produk"].ToString() != null) //{ // kategori5.Text = dt.Rows[i]["nama_kategori"].ToString(); // new5.Text = dt.Rows[i]["nama_produk"].ToString(); // newImg5.ImageUrl = dt.Rows[i]["gambar"].ToString(); // price5.Text = dt.Rows[i]["harga_jual"].ToString(); //} } } else { //showMessage("Data Not Found"); } }
protected void Back_Button_Click(object sender, EventArgs e) { MultiView1.SetActiveView(Search_Customer_View); }
protected void Back_Button_Click(object sender, EventArgs e) { MultiView1.SetActiveView(Order_Summary_View); Orders_GridView.DataBind(); }
protected void lnkshowchild_Click(object sender, EventArgs e) { //LoadGrid1(); MultiView1.SetActiveView(View2); MultiView1.Visible = true; }
protected void reply_Click(object sender, EventArgs e) { MultiView1.SetActiveView(View3); }
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e) { MultiView1.SetActiveView(UserManagerView); DropDownList1.SelectedValue = "Manager Users"; RefreshUserManager(); }
protected void BtnClose_Click(object sender, EventArgs e) { Clear(); MultiView1.SetActiveView(View1); }
protected void btnSubmit_Click(object sender, EventArgs e) { try { string userName = txtEmployeeNo.Text.Trim().Replace("'", ""); string userPassword = idNo.Text.Trim().Replace("'", ""); var idcheck = nav.MemberList.Where(r => r.No == userName).Select(k => k.ID_No).FirstOrDefault(); var emalcheck = nav.MemberList.Where(r => r.No == userName).Select(k => k.E_Mail).FirstOrDefault(); var phonecheck = nav.MemberList.Where(r => r.No == userName).Select(k => k.Phone_No).FirstOrDefault(); if (string.IsNullOrWhiteSpace(userName)) { lblError.Text = "Please enter your Member Number!"; btnSubmit.Visible = true; btnBack.Visible = true; //btnSignup.Visible = false; btnLogin.Visible = false; MultiView1.SetActiveView(View2); SACCOFactory.ShowAlert("Please enter your Member Number"); return; } if (string.IsNullOrWhiteSpace(userPassword)) { lblError.Text = "Please enter your ID number!"; btnSubmit.Visible = true; btnBack.Visible = true; //btnSignup.Visible = false; btnLogin.Visible = false; MultiView1.SetActiveView(View2); SACCOFactory.ShowAlert("Please enter your ID number"); return; } var nPassword = NewPassword(); var CompEmail = WSConfig.ObjNav.FnUpdatePassword(txtEmployeeNo.Text.Trim(), nPassword, idNo.Text.Trim()); if (WSConfig.MailFunction(string.Format("Dear Sacco Member,\n Your New password is: {0}", nPassword), CompEmail, "Portal password reset successful") && !String.IsNullOrEmpty(CompEmail)) { SACCOFactory.ShowAlert( "A New Password has been generated and sent to your Personal mail.Kindly use to it to login to your Member portal"); btnSubmit.Visible = true; btnBack.Visible = true; //btnSignup.Visible = false; btnLogin.Visible = false; MultiView1.SetActiveView(View2); lblError.Text = ""; } else if (idcheck != userPassword) { SACCOFactory.ShowAlert( "Your Password could not be reset. Member number does not match your ID number!"); //btnSubmit.Visible = true; //btnBack.Visible = true; //btnSignup.Visible = false; //btnLogin.Visible = false; //MultiView1.SetActiveView(View2); lblError.Text = "Your Password could not be reset. Member number does not match your ID number!"; } else if (string.IsNullOrEmpty(emalcheck) && phonecheck != null) { SACCOFactory.ShowAlert( "Your Password was send to your Phone Number"); //btnSubmit.Visible = false; //txtEmployeeNo.Enabled = false; //idNo.Enabled = false; //btnBack.Visible = false; //MultiView1.SetActiveView(View1); //btnSignup.Visible = true; //btnLogin.Visible = true; lblError.Text = "Your Password was send to your Phone Number"; } } catch (Exception er) { SACCOFactory.ShowAlert("Fill all the fields required!!"); } btnSubmit.Visible = true; btnBack.Visible = true; //btnSignup.Visible = false; btnLogin.Visible = false; MultiView1.SetActiveView(View2); }