protected void Page_Load(object sender, EventArgs e) { UserDetail usrDetails = null; if (Session["UserDetails"] != null) { usrDetails = Session["UserDetails"] as UserDetail; } else { Response.Redirect("~/login.aspx"); return; } this.ShowQOH.Attributes["value"] = usrDetails.QOH; this.SubmitMessage.Attributes["value"] = GetSubmitMessage(); string orderNo = Request.QueryString["orderno"]; this.OrderNo.Attributes["value"] = orderNo; TurningpointDataComponent tpsData = new TurningpointDataComponent(); this.CustNo.Attributes["value"] = tpsData.GetOrderCustomer(decimal.Parse(orderNo)); if (ConfigurationManager.AppSettings["RX"] == "yes") { this.RX.Attributes["value"] = "Y"; } else { this.RX.Attributes["value"] = "N"; } }
private void FillDropDowns() { UserDetail usrDetails = Session["UserDetails"] as UserDetail; TurningpointDataComponent turningPointComponent = new TurningpointDataComponent(); search_params_class_dropdown.Items.Add(new ListItem() { Text = "", Value = "" }); foreach (KeyValuePair <string, string> kv in turningPointComponent.GetItemClasses(usrDetails.TPSCustomerNumber)) { search_params_class_dropdown.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } search_params_vendor_dropdown.Items.Add(new ListItem() { Text = "", Value = "" }); foreach (KeyValuePair <string, string> kv in turningPointComponent.GetItemVendors()) { search_params_vendor_dropdown.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } foreach (KeyValuePair <string, string> kv in turningPointComponent.GetRoundingCodes()) { rounding_dropdown.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } foreach (KeyValuePair <string, string> kv in turningPointComponent.GetRoundingCodes()) { rounding_dropdown_item.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } class_dropdown.Items.Add(new ListItem() { Text = "", Value = "" }); foreach (KeyValuePair <string, string> kv in turningPointComponent.GetItemClasses(usrDetails.TPSCustomerNumber)) { class_dropdown.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } }
private void LoadView() { TurningpointDataComponent tpsData = new TurningpointDataComponent(); AccountStatus acct = tpsData.GetCustAccount(this.CustNo.Attributes["value"]); header_amount_due.Text = String.Format("{0:C}", acct.AmountOpen); header_last_payment_date.Text = acct.LastPaymentDate.ToShortDateString(); header_last_payment_amt.Text = String.Format("{0:C}", acct.LastPaymentAmount); SearchAccountsPayableParameters parms = new SearchAccountsPayableParameters(); parms.CustomerNumber = this.CustNo.Attributes["value"]; if (date_start.IsDate && !date_start.IsNull) { parms.Date = date_start.SelectedDate; } if (date_end.IsDate && !date_end.IsNull) { parms.ToDate = date_end.SelectedDate; } parms.DocumentNumber = txn_number.Text.Trim(); SearchAccountsPayableResponse response = tpsData.SearchAccountsPayable(parms); DataTable dt = new DataTable(); dt.Columns.Add("TxnDate"); dt.Columns.Add("TxnNo"); dt.Columns.Add("TxnType"); dt.Columns.Add("Amount"); dt.Columns.Add("Closed", typeof(bool)); foreach (AccountPayable ap in response.AccountPayableList) { int iClosed; if (ap.ARClosed == 0) { iClosed = 1; } else { iClosed = 0; } dt.Rows.Add(ap.Date.ToShortDateString(), ap.DocNo, ap.DocType, ap.Amount, iClosed); } DataView dv = new DataView(dt); item_list.DataSource = dv; item_list.DataBind(); }
private void FillDropDowns() { UserDetail usrDetails = Session["UserDetails"] as UserDetail; TurningpointDataComponent turningPointComponent = new TurningpointDataComponent(); search_params_class_dropdown.Items.Add(new ListItem() { Text = "", Value = "" }); if (ConfigurationManager.AppSettings["RX_V6"] == "yes") { foreach (KeyValuePair <string, string> kv in turningPointComponent.GetItemClasses2()) { search_params_class_dropdown.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } } else { foreach (KeyValuePair <string, string> kv in turningPointComponent.GetItemClasses(usrDetails.TPSCustomerNumber)) { search_params_class_dropdown.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } } search_params_vendor_dropdown.Items.Add(new ListItem() { Text = "", Value = "" }); foreach (KeyValuePair <string, string> kv in turningPointComponent.GetItemVendors()) { search_params_vendor_dropdown.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } this.day_of_week_dd.Items.Add(new ListItem("", "")); this.day_of_week_dd.Items.Add(new ListItem("MONDAY", "MO")); this.day_of_week_dd.Items.Add(new ListItem("TUESDAY", "TU")); this.day_of_week_dd.Items.Add(new ListItem("WEDNESDAY", "WE")); this.day_of_week_dd.Items.Add(new ListItem("THURSDAY", "TH")); this.day_of_week_dd.Items.Add(new ListItem("FRIDAY", "FR")); this.day_of_week_dd.Items.Add(new ListItem("SATURDAY", "SA")); this.day_of_week_dd.Items.Add(new ListItem("SUNDAY", "SU")); }
protected void btnSubmit_Click(object sender, EventArgs e) { TurningpointDataComponent dataComponent = new TurningpointDataComponent(); ForgotPasswordResponse response = dataComponent.VerifyUserAnswer(txt_username.Text.ToUpper(), txt_answer.Text.ToUpper()); if (response.Status == false) { lbl_password.Text = "Your answer was incorrect. Please contact your administrator for assistance."; } else { lbl_password.Text = "Your password is: " + response.Password.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { this.bUpdating.Attributes["value"] = "0"; page_header.setHeader("Retails"); if (ConfigurationManager.AppSettings["SqlServer"] == "yes") { TurningpointDataComponent turningPointComponent = new TurningpointDataComponent(); if (turningPointComponent.IsRetailsBlocked()) { retail_class_li.Visible = false; retail_items_li.Visible = false; retail_all_items_li.Visible = false; search_li.Visible = false; loading_li.Visible = true; li_class.Visible = false; li_items.Visible = false; li_all.Visible = false; li_search.Visible = false; li_loading.Visible = true; this.bUpdating.Attributes["value"] = "1"; } } if (!Page.IsPostBack) { UserDetail usrDetails = null; if (Session["UserDetails"] != null) { usrDetails = Session["UserDetails"] as UserDetail; } else { Response.Write("<script>window.open('login.aspx','_top');</script>"); return; } this.CustomerNo.Attributes["value"] = usrDetails.TPSCustomerNumber; this.RetailsHelpFile.Attributes["value"] = ConfigurationManager.AppSettings["RetailsHelpFile"]; FillDropDowns(); //DateTime dtNow = DateTime.Today; //date_input.Value = dtNow.ToShortDateString(); //date_input_item.Value = dtNow.ToShortDateString(); } }
private void setquestion(string name) { TurningpointDataComponent databasecomp = new TurningpointDataComponent(); ForgotPasswordResponse response = databasecomp.GetUserQuestion(name.ToUpper()); if (response.Question != null && response.Question != String.Empty) { txt_question.Text = response.Question.ToString().Trim(); } else { name = name.ToUpper(); txt_question.Text = String.Format( "No question was found for username {0}. Please contact your administrator", name); } }
private void FillDropDowns() { TurningpointDataComponent turningPointComponent = new TurningpointDataComponent(); ListItem li = new ListItem("- Select Brand Family -", ""); li.Selected = true; brand_family_dropdown.Items.Add(li); foreach (KeyValuePair <string, string> kv in turningPointComponent.GetItemBrands()) { brand_family_dropdown.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } }
private void FillDropDowns() { UserDetail usrDetails = Session["UserDetails"] as UserDetail; TurningpointDataComponent turningPointComponent = new TurningpointDataComponent(); search_params_class_dropdown.Items.Add(new ListItem() { Text = "", Value = "" }); if (ConfigurationManager.AppSettings["RX_V6"] == "yes") { foreach (KeyValuePair <string, string> kv in turningPointComponent.GetItemClasses2()) { search_params_class_dropdown.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } } else { foreach (KeyValuePair <string, string> kv in turningPointComponent.GetItemClasses(usrDetails.TPSCustomerNumber)) { search_params_class_dropdown.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } } search_params_vendor_dropdown.Items.Add(new ListItem() { Text = "", Value = "" }); foreach (KeyValuePair <string, string> kv in turningPointComponent.GetItemVendors()) { search_params_vendor_dropdown.Items.Add(new ListItem() { Text = kv.Value, Value = kv.Key }); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { UserDetail usrDetails = null; if (Session["UserDetails"] != null) { usrDetails = Session["UserDetails"] as UserDetail; } else { Response.Write("<script>window.open('login.aspx','_top');</script>"); return; } this.ShowQOH.Attributes["value"] = usrDetails.QOH; string orderNo = Request.QueryString["orderno"]; this.OrderNo.Attributes["value"] = orderNo; if (decimal.Parse(orderNo) > 0) { TurningpointDataComponent tpsData = new TurningpointDataComponent(); this.CustomerNo.Attributes["value"] = tpsData.GetOrderCustomer(decimal.Parse(orderNo)); } else { this.CustomerNo.Attributes["value"] = usrDetails.TPSCustomerNumber; } string formName = Request.QueryString["form"]; this.FormName.Attributes["value"] = formName; string editType = Request.QueryString["type"]; this.EditType.Attributes["value"] = editType; if (editType == "form") { lblOrders.Text = "Edit Form"; } FillDropDowns(); if (ConfigurationManager.AppSettings["RX"] == "yes") { this.RX.Attributes["value"] = "Y"; search_params_item_title.Text = "Item#:"; order_entry_hdr_qoh.InnerText = "BOH"; new_items_hdr_qoh.InnerText = "BOH"; search_hdr_qoh.InnerText = "BOH"; } else { this.RX.Attributes["value"] = "N"; search_params_item_title.Text = "UPC or Item#:"; } if (ConfigurationManager.AppSettings["LWD"] == "yes") { items_1.Visible = true; items_2.Visible = true; } if (ConfigurationManager.AppSettings["ShowDayOfWeek"] == "yes") { day_of_week.Visible = true; day_of_week_label.Visible = true; } if (ConfigurationManager.AppSettings["ShowWillCall"] == "no") { will_call.Visible = false; will_call.Visible = false; } } }