protected void btnOtp_Click(object sender, EventArgs e) { string numbers = "1234567890"; string characters = numbers; if (numbers == "1") { characters += numbers; } int length = int.Parse("5"); string otp = string.Empty; for (int i = 0; i < length; i++) { string character = string.Empty; do { int index = new Random().Next(0, characters.Length); character = characters.ToCharArray()[index].ToString(); } while (otp.IndexOf(character) != -1); otp += character; } ViewState["GenerateOTP"] = otp; // OTP = ViewState["GenerateOTP"].ToString(); OTP = "00000"; int UserId = ddlUser.SelectedIndex; string Contact = USERPROFILEMASTER.GetByRegistration_ID(UserId).ContactNumber; // Sendmsg("Your OTP is " + " " + OTP, Contact); txtComfirmotp.Visible = true; btnWelletpay.Visible = true; }
private bool SaveNewUserAssociation() { int newUserId = 0; int parentUserId = 0; int.TryParse(dropNewUser.SelectedValue, out newUserId); int.TryParse(dropParentUser.SelectedValue, out parentUserId); if (parentUserId > 0 && newUserId > 0) { string UserName = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).User_Name; SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DB"].ConnectionString); string query = "UPDATE USERPROFILEMASTER SET UserParentId = " + dropParentUser.SelectedValue + " WHERE Registration_ID = " + dropNewUser.SelectedValue; SqlCommand cmd = new SqlCommand(query, con); //cmd.CommandType = CommandType.StoredProcedure; //cmd.Parameters.AddWithValue("@UserName", UserName); try { con.Open(); cmd.ExecuteNonQuery(); con.Close(); } catch (Exception ex) { //write error message } return(true); } return(false); }
public void Member_detail(int MID) { try { USERPROFILEMASTER drms = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())); if (drms.Registration_ID > 0) { #region Billing Address ViewState["Name"] = drms.First_Name + " " + drms.Last_Name; ViewState["Address"] = drms.Address + " " + drms.AddressLine2; ViewState["City"] = drms.CityName; ViewState["State"] = drms.StateName; ViewState["Zip"] = drms.ZipCode; ViewState["Country"] = drms.COUNTRY; ViewState["Contact"] = drms.ContactNumber; ViewState["Email"] = drms.Email; #endregion #region Shipping address ViewState["ShipName"] = drms.ShippingFirstName + " " + drms.ShippingLastName; ViewState["ShipAddress"] = drms.ShippingAddress + " " + drms.ShippingAddressLine2; ViewState["ShipCity"] = drms.ShipCityName; ViewState["ShipState"] = drms.ShippStateName; ViewState["ShipZip"] = drms.ShippingZip; ViewState["ShipCountry"] = drms.COUNTRY; ViewState["Contact"] = drms.ContactNumber; ViewState["Email"] = drms.Email; #endregion } } catch (Exception ex) { string script = "<script>alert('" + ex.Message + "');</script>"; } }
public void Tranfer() { try { USERPROFILEMASTER lm = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())); if (lm.Registration_ID > 0) { USERPROFILEMASTER lmm = new USERPROFILEMASTER(); decimal PreviousAmount = lm.UserWallet; decimal Amount = decimal.Parse(txtamount.Text.Trim()); decimal TotalAmount = PreviousAmount + Amount; lmm.WalletRecharge(lm.Registration_ID, TotalAmount); { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Wallet recharge successful..!!!')</script>", false); } } else { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Some technical issues. Please contact our support team...!!!')</script>", false); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('" + ex.Message + "')</script>", false); } }
protected void Page_Load(object sender, EventArgs e) { lblProfileName.Text = " Wellcome," + " " + USERPROFILEMASTER.GetByUser_Name(Session["UserName"] == null ? string.Empty : Session["UserName"].ToString()).First_Name + " " + USERPROFILEMASTER.GetByUser_Name(Session["UserName"] == null ? string.Empty : Session["UserName"].ToString()).Last_Name; decimal Am = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).UserWallet; lblWallet.Text = Am.ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { decimal Am = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).UserWallet; lblWallet.Text = Am.ToString(); GetTotalSale(); } }
protected void Page_Load(object sender, EventArgs e) { this.checkAddress.Attributes.Add("onClick", "CopyText()"); if (!IsPostBack) { fillstate(); fillMyRefName(); fillNEWUSER(); BinddropParentUser(); Member_detail(int.Parse(Session["loginid"].ToString())); decimal Am = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).UserWallet; lblWallet.Text = Am.ToString(); } }
public void Tranfer() { try { decimal totalamt = 0; int UserId = ddlUser.SelectedIndex; USERPROFILEMASTER User = USERPROFILEMASTER.GetByRegistration_ID(UserId); if (User.Registration_ID > 0) { foreach (GridViewRow gv in gdvNotice.Rows) { totalamt += decimal.Parse(gv.Cells[4].Text.ToString()); } decimal UserAmount = User.UserWallet; decimal TransferAmount = totalamt; if (UserAmount <= TransferAmount) { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Insufulset amount in User account.!!!')</script>", false); return; } PickupMaster lm = PickupMaster.GetByPickupID(int.Parse(Session["PickupID"].ToString())); if (lm.PickupID > 0) { PickupMaster lmm = new PickupMaster(); decimal PreviousAmount = lm.PickUpWallet; decimal Amount = totalamt; decimal TotalAmount = PreviousAmount + Amount; lmm.PaymentByWallet(lm.PickupID, TotalAmount); { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Payment successful..!!!')</script>", false); } } decimal MyAmount = User.UserWallet; decimal TranferAmount = totalamt; decimal FinalAmount = MyAmount - TranferAmount; User.WalletRecharge(User.Registration_ID, FinalAmount); MakePayment(); } else { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Old Password is not Correct...!!!')</script>", false); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('" + ex.Message + "')</script>", false); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["loginid"] != null && !string.IsNullOrEmpty(Session["loginid"].ToString())) { decimal Am = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).UserWallet; lblWallet.Text = Am.ToString(); } else { Response.Redirect("../Default.aspx"); } GetAddtoCartDetail(); GetTotalOnlineSale(); } }
protected void ddlItem_SelectedIndexChanged(object sender, EventArgs e) { try { if (ddlItem.SelectedIndex > 0) { if (ddlUser.SelectedIndex > 0) { int ItemId = int.Parse(ddlItem.SelectedValue); int User = ddlUser.SelectedIndex; txtItemCode.Text = PickUpItemMaster.GetByOrderId(ItemId).HSNCODE; txtrate.Text = PickUpItemMaster.GetByOrderId(ItemId).RATE_PER.ToString(); int UserState = USERPROFILEMASTER.GetByRegistration_ID(User).State; int PicUpState = PickupMaster.GetByPickupID(int.Parse(Session["PickupID"].ToString())).State; if (UserState == PicUpState) { txtigst.Text = "0"; txtcgst.Text = PickUpItemMaster.GetByOrderId(ItemId).CGST.ToString(); txtsgst.Text = PickUpItemMaster.GetByOrderId(ItemId).SGST.ToString(); } else { txtcgst.Text = "0"; txtsgst.Text = "0"; txtigst.Text = PickUpItemMaster.GetByOrderId(ItemId).IGST.ToString(); } } else { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<Script>alert('Plz Select User');</Script>", false); ddlUser.Focus(); return; } } else { txtcgst.Text = "0"; txtsgst.Text = "0"; txtigst.Text = "0"; } BindSizeColorDropdown(ddlItem.SelectedValue); } catch (Exception ew) { } }
protected void linkbtnView_Click(object sender, EventArgs e) { try { LinkButton lb = (LinkButton)sender; GridViewRow gv = (GridViewRow)lb.NamingContainer; int FileId = int.Parse(((Label)gv.FindControl("labelNOTICE_ID")).Text); USERPROFILEMASTER rg = USERPROFILEMASTER.GetByRegistration_ID(FileId); if (rg.Registration_ID > 0) { Response.Redirect("EditSignUpDetail.aspx?st=" + rg.Registration_ID); } } catch (Exception ex) { string script = "<script>alert('" + ex.Message + "');</script>"; } }
public void Tranfer() { try { USERPROFILEMASTER User = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())); if (User.Registration_ID > 0) { decimal UserAmount = User.UserWallet; decimal TransferAmount = decimal.Parse(txtamount.Text.Trim()); if (UserAmount <= TransferAmount) { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Insufulset amount in your accoun.!!!')</script>", false); return; } USERPROFILEMASTER lm = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(ddlUser.SelectedValue)); if (lm.Registration_ID > 0) { USERPROFILEMASTER lmm = new USERPROFILEMASTER(); decimal PreviousAmount = lm.UserWallet; decimal Amount = decimal.Parse(txtamount.Text.Trim()); decimal TotalAmount = PreviousAmount + Amount; lmm.WalletRecharge(lm.Registration_ID, TotalAmount); { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Wallet recharge successful..!!!')</script>", false); } } decimal MyAmount = User.UserWallet; decimal TranferAmount = decimal.Parse(txtamount.Text.Trim()); decimal FinalAmount = MyAmount - TranferAmount; User.WalletRecharge(User.Registration_ID, FinalAmount); } else { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Old Password is not Correct...!!!')</script>", false); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('" + ex.Message + "')</script>", false); } }
public void fillMyRefName() { try { string UserName = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).User_Name; List <USERPROFILEMASTER> _state = USERPROFILEMASTERCollection.GetByReference_Id(UserName); USERPROFILEMASTER sm = new USERPROFILEMASTER(); sm.Registration_ID = 0; sm.User_Name = "- Our Reference Person-"; _state.Insert(0, sm); dropMyRef.DataSource = _state; dropMyRef.DataTextField = "User_Name"; dropMyRef.DataValueField = "Registration_ID"; dropMyRef.DataBind(); } catch (Exception ex) { string script = "<script>alert('" + ex.Message + "');</script>"; } }
public DataTable OurRefence() { string RefenceName = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).User_Name; SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DB"].ConnectionString); SqlCommand cmd = new SqlCommand("GetNotLinkReferenceUsers", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Reference_Id", RefenceName); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); try { con.Open(); da.Fill(ds); con.Close(); } catch (Exception ex) { } return(ds.Tables[0]); }
public void Member_detail(int MID) { try { USERPROFILEMASTER drms = USERPROFILEMASTER.GetByRegistration_ID(MID); if (drms.Registration_ID > 0) { #region ViewState["MID"] = MID; txtuseraname.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(MID.ToString())).User_Name; txtFirstname.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(MID.ToString())).First_Name; txtLastName.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(MID.ToString())).Last_Name; txtemail.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(MID.ToString())).Email; txtcontact.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(MID.ToString())).ContactNumber; txtReferenceId.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(MID.ToString())).Reference_Id; #endregion } } catch (Exception ex) { string script = "<script>alert('" + ex.Message + "');</script>"; } }
protected void btnSignUp_Click(object sender, EventArgs e) { if (btnSignUp.Text == "Submit Changes") { USERPROFILEMASTER um = new USERPROFILEMASTER(); um.Registration_ID = int.Parse(ViewState["MID"].ToString()); um.First_Name = txtFirstname.Text.Trim(); um.Last_Name = txtLastName.Text.Trim(); um.User_Name = txtuseraname.Text.Trim(); um.Email = txtemail.Text.Trim(); um.ContactNumber = txtcontact.Text; um.Reference_Id = txtReferenceId.Text.Trim(); um.User_ID = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).User_ID; um.Password = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Password; um.DOB = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).DOB; um.AlternativeNumber = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).AlternativeNumber; um.NomineeName = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).NomineeName; um.NomineeId = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).NomineeId; um.NomineeRelation = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).NomineeRelation; um.RegDate = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).RegDate; um.COUNTRY = "India"; um.Individual_Company = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Individual_Company; um.IdentificationType = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).IdentificationType; um.TaxExempt = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).TaxExempt; um.Commission = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Commission; um.WFile = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).WFile; um.AnniversaryDate = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).AnniversaryDate; um.SmartDeliveryDate = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).SmartDeliveryDate; um.Website = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Website; um.Address = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Address; um.AddressLine2 = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).AddressLine2; um.City = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).City; um.State = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).State; um.StateOther = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).StateOther; um.ZipCode = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).ZipCode; um.ShippingFirstName = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).ShippingFirstName; um.ShippingLastName = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).ShippingLastName; um.ShippingAddress = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).ShippingAddress; um.ShippingAddressLine2 = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).ShippingAddressLine2; um.ShippingCity = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).ShippingCity; um.ShippingState = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).ShippingState; um.ShippingStateOther = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).ShippingStateOther; um.ShippingZip = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).ShippingZip; um.Fax = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Fax; um.Co_Applicant = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Co_Applicant; um.Language = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Language; um.Skype = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Skype; um.Twitter = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Twitter; um.Facebook = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Facebook; um.AadharVerified = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).AadharVerified; um.PanVerified = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).PanVerified; um.ChequeVerified = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).ChequeVerified; um.GstinVerified = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).GstinVerified; um.AddressVerified = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).AddressVerified; um.Image_Name = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Image_Name; um.Status = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Status; um.UserParentId = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).UserParentId; um.Save(); ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Change Sucessfull...!!');</script>", false); // Response.Redirect("Default.aspx"); } }
protected void lnkWallet2_Click(object sender, EventArgs e) { int UserID = int.Parse(Session["loginid"].ToString()); USERPROFILEMASTER User = USERPROFILEMASTER.GetByRegistration_ID(UserID); if (User.Registration_ID > 0) { decimal UserAmount = User.UserWallet; decimal TransferAmount = 5000;// totalAmount; if (UserAmount <= TransferAmount) { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Insufulset amount in User account.!!!')</script>", false); return; } #region SqlConnection cn = new SqlConnection(constr); SqlCommand cmd = new SqlCommand("usp_SaveUserOrder", cn); SqlDataAdapter adptr = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@User_id", UserID); cn.Open(); adptr.Fill(ds); cn.Close(); orderNo = ds.Tables[0].Rows[0]["OrderNo"].ToString(); totalAmount = Convert.ToDecimal(ds.Tables[0].Rows[0]["TotalAmount"]); #endregion USERPROFILEMASTER lm = USERPROFILEMASTER.GetByUser_Name("OMHRD"); if (lm.Registration_ID > 0) { USERPROFILEMASTER lmm = new USERPROFILEMASTER(); decimal PreviousAmount = lm.UserWallet; decimal Amount = totalAmount; decimal TotalAmount = PreviousAmount + Amount; lmm.WalletRecharge(lm.Registration_ID, TotalAmount); { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Payment successful..!!!')</script>", false); } } decimal MyAmount = User.UserWallet; decimal TranferAmount = totalAmount; decimal FinalAmount = MyAmount - TranferAmount; User.WalletRecharge(User.Registration_ID, FinalAmount); #region SaveUserOrderPayment using (SqlConnection conn = new SqlConnection(constr)) { SqlDataAdapter da = new SqlDataAdapter(); da.InsertCommand = new SqlCommand("Insert Into UserOrderPaymenttbl (Orderid, TrackingId, BankRefNo, OrderStatus,FailureMessage,PaymentMod,CardName,StatusCode,StatusMessage,ResponseCode,PaymentDate,Amount,UserId) Values (@Orderid, @TrackingId, @BankRefNo, @OrderStatus,@FailureMessage,@PaymentMod,@CardName,@StatusCode,@StatusMessage,@ResponseCode,@PaymentDate,@Amount,@UserId)", conn); da.InsertCommand.Parameters.Add("@Orderid", SqlDbType.Int).Value = 0; da.InsertCommand.Parameters.Add("@TrackingId", SqlDbType.Text).Value = ""; da.InsertCommand.Parameters.Add("@BankRefNo", SqlDbType.Text).Value = ""; da.InsertCommand.Parameters.Add("@OrderStatus", SqlDbType.Text).Value = "Success"; da.InsertCommand.Parameters.Add("@FailureMessage", SqlDbType.Text).Value = ""; da.InsertCommand.Parameters.Add("@PaymentMod", SqlDbType.Text).Value = "Wallet"; da.InsertCommand.Parameters.Add("@CardName", SqlDbType.Text).Value = ""; da.InsertCommand.Parameters.Add("@StatusCode", SqlDbType.Int).Value = 0; da.InsertCommand.Parameters.Add("@StatusMessage", SqlDbType.Text).Value = ""; da.InsertCommand.Parameters.Add("@ResponseCode", SqlDbType.Int).Value = 0; da.InsertCommand.Parameters.Add("@PaymentDate", SqlDbType.DateTime).Value = System.DateTime.Now; da.InsertCommand.Parameters.Add("@Amount", SqlDbType.Decimal).Value = totalAmount; da.InsertCommand.Parameters.Add("@UserId", SqlDbType.Int).Value = UserID; conn.Open(); da.InsertCommand.ExecuteNonQuery(); conn.Close(); } #endregion } else { ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Some technical error...!!!')</script>", false); } }
protected void btnUpdate_Click(object sender, EventArgs e) { #region if (btnUpdate.Text == "Submit Changes") { USERPROFILEMASTER um = new USERPROFILEMASTER(); um.Registration_ID = int.Parse(Session["loginid"].ToString()); um.First_Name = txtFname.Text.Trim(); um.Last_Name = txtLName.Text.Trim(); um.Email = txtEmail.Text.Trim(); um.User_Name = lblUsername.Text.Trim(); um.User_ID = lblUSerId.Text; um.Password = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Password; um.DOB = DateTime.Parse(txtDOB.Text); um.ContactNumber = txtHomePhone.Text.Trim(); um.NomineeName = um.NomineeName; um.NomineeId = um.NomineeId; um.NomineeRelation = um.NomineeRelation; um.Reference_Id = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Reference_Id; um.RegDate = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).RegDate; um.COUNTRY = "India"; um.Individual_Company = txtIndividual.Text; um.IdentificationType = lblIdentiType.Text; um.TaxExempt = lblTaxExempt.Text; um.Commission = lblCommHoldExempt.Text; um.WFile = lblW9File.Text; um.AnniversaryDate = DateTime.Parse(txtAnniversaryDate.Text); um.SmartDeliveryDate = DateTime.Parse(lblSmartDeliveryDate.Text); um.Website = txtwebsite.Text; um.Address = txtAddress.Text; um.AddressLine2 = txtAddressline2.Text; um.State = int.Parse(DropState.SelectedValue); fillcity(); um.City = int.Parse(DropCity.SelectedValue); um.StateOther = txtStateOther.Text; um.ZipCode = txtZipCode.Text; um.ShippingFirstName = txtShipFname.Text; um.ShippingLastName = txtShipLname.Text; um.ShippingAddress = txtShipAdd.Text; um.ShippingAddressLine2 = txtShipAdd2.Text; um.ShippingState = int.Parse(dropShipstate.SelectedValue); fillShippingCity(); um.ShippingCity = int.Parse(dropShipCity.SelectedValue); um.ShippingZip = txtShipZipCode.Text; um.ShippingStateOther = txtShipStateOther.Text; um.AlternativeNumber = txtAlternetContact.Text; um.Fax = txtFaxNumber.Text; um.Co_Applicant = lblCoApplicantName.Text; um.Language = dropLanguage.Text; um.Skype = txtSkype.Text; um.Twitter = txtTwitter.Text; um.Facebook = txtFacebook.Text; #region AadharVerified um.AadharVerified = txtadhar.Text; string exten1 = System.IO.Path.GetExtension(fileAdhar.FileName); if (fileAdhar.HasFile == true) { fileAdhar.SaveAs(Server.MapPath("~/images/UsreVerifiedImages/" + um.User_Name + "AadharVerified" + exten1)); um.AadharImage = um.User_Name + "AadharVerified" + exten1; } else { um.AadharImage = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).AadharImage; } #endregion #region PanVerified um.PanVerified = txtPancard.Text; string exten2 = System.IO.Path.GetExtension(filePan.FileName); if (filePan.HasFile == true) { filePan.SaveAs(Server.MapPath("~/images/UsreVerifiedImages/" + um.User_Name + "PanVerified" + exten2)); um.PanImage = um.User_Name + "PanVerified" + exten2; } else { um.PanImage = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).PanImage; } #endregion #region ChequeVerified um.ChequeVerified = txtCheque.Text; string exten3 = System.IO.Path.GetExtension(fileCheque.FileName); if (fileCheque.HasFile == true) { fileCheque.SaveAs(Server.MapPath("~/images/UsreVerifiedImages/" + um.User_Name + "ChequeVerified" + exten3)); um.ChequeImage = um.User_Name + "ChequeVerified" + exten3; } else { um.ChequeImage = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).ChequeImage; } #endregion um.GstinVerified = txtgst.Text; #region AddressVerified um.AddressVerified = txtaddProof.Text; string exten4 = System.IO.Path.GetExtension(fileAdd.FileName); if (fileAdd.HasFile == true) { fileAdd.SaveAs(Server.MapPath("~/images/UsreVerifiedImages/" + um.User_Name + "AddressVerified" + exten4)); um.AddressImage = um.User_Name + "AddressVerified" + exten4; } else { um.AddressImage = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).AddressImage; } #endregion #region ProfileImage string exten = System.IO.Path.GetExtension(fileImage.FileName); if (fileImage.HasFile == true) { fileImage.SaveAs(Server.MapPath("~/images/ProfileImages/" + um.User_Name + exten)); um.Image_Name = um.User_Name + exten; } else { um.Image_Name = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).Image_Name; } #endregion um.Status = lblStatus.Text; um.BankName = txtBankName.Text.Trim(); um.AccountNo = txtaccount.Text.Trim(); um.IFSCCode = txtifsc.Text.Trim(); um.Branch = txtbranch.Text.Trim(); um.UserParentId = USERPROFILEMASTER.GetByRegistration_ID(um.Registration_ID).UserParentId; um.Save(); SaveNewUserAssociation(); ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Save Sucessfull...!!');</script>", false); Response.Redirect("AdminProfileShow.aspx"); } #endregion }
public void PrintBill() { try { int UserId = 0; Int32.TryParse(ddlUser.SelectedValue, out UserId); List <ProductInvoice_Master> _Pro = ProductInvoice_MasterCollection.GetAll().FindAll(x => x.BILL_ID == billid); #region Company string CompanyName = USERPROFILEMASTER.GetByUser_Name("OMHRD").First_Name; string CompanyAddress = USERPROFILEMASTER.GetByUser_Name("OMHRD").Address; string CompanyState = USERPROFILEMASTER.GetByUser_Name("OMHRD").StateName; string CompanyCity = USERPROFILEMASTER.GetByUser_Name("OMHRD").CityName; string ZipCode = USERPROFILEMASTER.GetByUser_Name("OMHRD").ZipCode; string CompanyGST = USERPROFILEMASTER.GetByUser_Name("OMHRD").GstinVerified; string CompanyContact = USERPROFILEMASTER.GetByUser_Name("OMHRD").ContactNumber; #endregion #region Seller string ShipName = USERPROFILEMASTER.GetByRegistration_ID(UserId).First_Name + " " + USERPROFILEMASTER.GetByRegistration_ID(UserId).Last_Name; string ShipAdd1 = USERPROFILEMASTER.GetByRegistration_ID(UserId).Address; string ShipAdd2 = USERPROFILEMASTER.GetByRegistration_ID(UserId).AddressLine2; string ShipState = USERPROFILEMASTER.GetByRegistration_ID(UserId).StateName; string ShipCity = USERPROFILEMASTER.GetByRegistration_ID(UserId).CityName; string ShipZip = USERPROFILEMASTER.GetByRegistration_ID(UserId).ZipCode; string Contry = USERPROFILEMASTER.GetByRegistration_ID(UserId).COUNTRY; string BillName = USERPROFILEMASTER.GetByRegistration_ID(UserId).First_Name + " " + USERPROFILEMASTER.GetByRegistration_ID(UserId).Last_Name; string PermanentAdd1 = USERPROFILEMASTER.GetByRegistration_ID(UserId).ShippingAddress; string PermanentAdd2 = USERPROFILEMASTER.GetByRegistration_ID(UserId).ShippingAddressLine2; string PermanentState = USERPROFILEMASTER.GetByRegistration_ID(UserId).ShippStateName; string PermanentCity = USERPROFILEMASTER.GetByRegistration_ID(UserId).ShipCityName; string PermanentZip = USERPROFILEMASTER.GetByRegistration_ID(UserId).ShippingZip; string Gstin = USERPROFILEMASTER.GetByRegistration_ID(UserId).GstinVerified; #endregion #region PickUp int PicupId = int.Parse(Session["PickupID"].ToString()); string PickUpName = PickupMaster.GetByPickupID(PicupId).FirstName + " " + PickupMaster.GetByPickupID(PicupId).LastName; string PickUpAddress = PickupMaster.GetByPickupID(PicupId).Address; string PickUpContact = PickupMaster.GetByPickupID(PicupId).ContactNo; string CenterName = PickupMaster.GetByPickupID(PicupId).CenterName; string CenterCode = PickupMaster.GetByPickupID(PicupId).CenterCode; #endregion #region BillDetail System.Guid guid = System.Guid.NewGuid(); String id = guid.ToString(); string OrderId = id; DateTime dt = System.DateTime.Today; string InvoiNo = ProductBill_Master.GetByBILL_ID(billid).BILLNO; string InvoiDate = dt.ToString(); string Phone = USERPROFILEMASTER.GetByRegistration_ID(UserId).ContactNumber; string Email = USERPROFILEMASTER.GetByRegistration_ID(UserId).Email; #endregion decimal totamt = Math.Round(ProductBill_Master.GetByBILL_ID(billid).TOTAL, 0); var values = totamt.ToString(CultureInfo.InvariantCulture).Split('.'); Int64 rup = Convert.ToInt64(values[0]); Int64 paise = 0; if (values.Length == 2) { paise = Convert.ToInt64(values[1]); } string rupee = string.Empty; string pa = string.Empty; if (paise != 0) { pa = Rupees(paise) + "Paise Only"; rupee = Rupees(rup) + "Rupees and " + pa; } else { rupee = Rupees(rup) + "Rupees Only"; } ReportViewer1.ProcessingMode = ProcessingMode.Local; this.ReportViewer1.LocalReport.EnableExternalImages = true; ReportViewer1.LocalReport.ReportPath = Server.MapPath("/Report/PickUpSale.rdlc"); ReportDataSource datasource = new ReportDataSource("BillGenrate", _Pro); ReportParameter[] rpt = new ReportParameter[33]; rpt[0] = new ReportParameter("CompanyName", CompanyName); rpt[1] = new ReportParameter("CompanyAddress", CompanyAddress); rpt[2] = new ReportParameter("CompanyState", CompanyState); rpt[3] = new ReportParameter("CompanyCity", CompanyCity); rpt[4] = new ReportParameter("ZipCode", ZipCode); rpt[5] = new ReportParameter("CompanyGST", CompanyGST); rpt[6] = new ReportParameter("CompanyContact", CompanyContact); rpt[7] = new ReportParameter("ShipName", ShipName); rpt[8] = new ReportParameter("ShipAdd1", ShipAdd1); rpt[9] = new ReportParameter("ShipAdd2", ShipAdd2); rpt[10] = new ReportParameter("ShipCity", ShipCity); rpt[11] = new ReportParameter("ShipState", ShipState); rpt[12] = new ReportParameter("ShipZip", ShipZip); rpt[13] = new ReportParameter("Contry", Contry); rpt[14] = new ReportParameter("BillName", BillName); rpt[15] = new ReportParameter("PermanentAdd1", PermanentAdd1); rpt[16] = new ReportParameter("PermanentAdd2", PermanentAdd2); rpt[17] = new ReportParameter("PermanentCity", PermanentCity); rpt[18] = new ReportParameter("PermanentState", PermanentState); rpt[19] = new ReportParameter("PermanentZip", PermanentZip); rpt[20] = new ReportParameter("Gstin", Gstin); rpt[21] = new ReportParameter("OrderId", OrderId); rpt[22] = new ReportParameter("InvoiNo", InvoiNo); rpt[23] = new ReportParameter("InvoiDate", InvoiDate); rpt[24] = new ReportParameter("Phone", Phone); rpt[25] = new ReportParameter("Email", Email); rpt[26] = new ReportParameter("TotalAmountWord", rupee); rpt[27] = new ReportParameter("PaymentMod", PaymentMod); rpt[28] = new ReportParameter("PickUpName", PickUpName); rpt[29] = new ReportParameter("PickUpAddress", PickUpAddress); rpt[30] = new ReportParameter("PickUpContact", PickUpContact); rpt[31] = new ReportParameter("CenterName", CenterName); rpt[32] = new ReportParameter("CenterCode", CenterCode); this.ReportViewer1.LocalReport.SetParameters(rpt); this.ReportViewer1.LocalReport.DataSources.Clear(); this.ReportViewer1.LocalReport.DataSources.Add(datasource); this.ReportViewer1.LocalReport.Refresh(); } catch (Exception ex) { } }
public void Member_detail(int MID) { try { USERPROFILEMASTER drms = USERPROFILEMASTER.GetByRegistration_ID((int.Parse(Session["loginid"].ToString()))); if (drms.Registration_ID > 0) { #region txtFname.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).First_Name; txtLName.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).Last_Name; txtEmail.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).Email; lblUsername.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).User_Name; lblUSerId.Text = drms.User_ID; // txtoldpass.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).Password; txtDOB.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).DOB.ToShortDateString(); txtHomePhone.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).ContactNumber; lblSponsorUserName.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).Reference_Id; lblSignupDate.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).RegDate.ToShortDateString(); lblCountry.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).COUNTRY; txtIndividual.Text = drms.Individual_Company; lblIdentiType.Text = drms.IdentificationType; lblTaxExempt.Text = drms.TaxExempt; lblCommHoldExempt.Text = drms.Commission; lblW9File.Text = drms.WFile; txtAnniversaryDate.Text = drms.AnniversaryDate.ToShortDateString(); lblSmartDeliveryDate.Text = drms.SmartDeliveryDate.ToShortDateString(); txtwebsite.Text = drms.Website; txtAddress.Text = drms.Address; txtAddressline2.Text = drms.AddressLine2; DropCity.SelectedIndex = drms.City; DropState.SelectedIndex = drms.State; txtStateOther.Text = drms.StateOther; txtZipCode.Text = drms.ZipCode; txtShipFname.Text = drms.ShippingFirstName; txtShipLname.Text = drms.ShippingLastName; txtShipAdd.Text = drms.ShippingAddress; txtShipAdd2.Text = drms.ShippingAddressLine2; dropShipCity.SelectedIndex = drms.ShippingCity; dropShipstate.SelectedIndex = drms.ShippingState; txtShipZipCode.Text = drms.ShippingZip; txtShipStateOther.Text = drms.ShippingStateOther; lblShipCountry.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).COUNTRY; txtAlternetContact.Text = drms.AlternativeNumber; txtFaxNumber.Text = drms.Fax; lblCoApplicantName.Text = drms.Co_Applicant; dropLanguage.Text = drms.Language; txtSkype.Text = drms.Skype; txtTwitter.Text = drms.Twitter; txtFacebook.Text = drms.Facebook; txtadhar.Text = drms.AadharVerified; if (drms.AadharImage == "" || drms.AadharImage == null) { Image1.ImageUrl = "~/images/b1.jpg"; } else { Image1.ImageUrl = "~/images/ProfileImages/" + drms.AadharImage; } txtPancard.Text = drms.PanVerified; if (drms.PanImage == "" || drms.PanImage == null) { Image2.ImageUrl = "~/images/b1.jpg"; } else { Image2.ImageUrl = "~/images/ProfileImages/" + drms.PanImage; } txtCheque.Text = drms.ChequeVerified; if (drms.ChequeImage == "" || drms.ChequeImage == null) { Image3.ImageUrl = "~/images/b1.jpg"; } else { Image3.ImageUrl = "~/images/ProfileImages/" + drms.ChequeImage; } txtgst.Text = drms.GstinVerified; txtaddProof.Text = drms.AddressVerified; if (drms.AddressImage == "" || drms.AddressImage == null) { Image4.ImageUrl = "~/images/b1.jpg"; } else { Image4.ImageUrl = "~/images/ProfileImages/" + drms.AddressImage; } if (drms.Image_Name == "" || drms.Image_Name == null) { ImagePhoto.ImageUrl = "~/images/b2.jpg"; } else { ImagePhoto.ImageUrl = "~/images/ProfileImages/" + drms.Image_Name; } lblStatus.Text = USERPROFILEMASTER.GetByRegistration_ID(int.Parse(Session["loginid"].ToString())).Status; txtBankName.Text = drms.BankName; txtaccount.Text = drms.AccountNo; txtifsc.Text = drms.IFSCCode; txtbranch.Text = drms.Branch; #endregion } } catch (Exception ex) { string script = "<script>alert('" + ex.Message + "');</script>"; } }