Example #1
0
        /// <summary>
        /// Code to insert the vendor address details
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ibtnSave_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                try
                {
                    string updateString = "ASNFormat='" + txtASNFormat.Text.Replace("'", "''") + "'," +
                                          "SpecialLbl='" + txtSpecialLabel.Text.Replace("'", "''") + "'," +
                                          "UPSNo='" + txtUPSAccount.Text.Replace("'", "''") + "'," +
                                          "ShipViaCd='" + ddlCarrier.SelectedValue.Trim() + "'," +
                                          "ConsMethCd='" + ddlConsolidationMethod.SelectedValue.Trim() + "'," +
                                          "ExpediteCd='" + ddlExpedite.SelectedValue.Trim() + "'," +
                                          "ShipMethCd='" + ddlMethod.SelectedValue.Trim() + "'," +
                                          "PriorityCd='" + ddlPriority.SelectedValue.Trim() + "'," +
                                          "ShipInstr='" + ddlShippingInstruction.SelectedValue.Trim() + "'," +
                                          "InvSortOrd='" + ddlSortOrder.SelectedValue.Trim() + "'," +
                                          "ShipLocation='" + ddlShippingLoc.SelectedValue.Trim() + "'," +
                                          "UsageLocation='" + ddlUsageLoc.SelectedValue.Trim() + "'," +
                                          "TransferLocation='" + ddlTrfLoc.SelectedValue.Trim() + "'," +
                                          "AllowDelProofInd='" + ((chkList.Items[0].Selected) ? "Y" : "N") + "'," +
                                          "AllowPartialsInd='" + ((chkList.Items[1].Selected) ? "Y" : "N") + "'," +
                                          "AllowSubsInd='" + ((chkList.Items[2].Selected) ? "Y" : "N") + "'," +
                                          "ASNInd='" + ((chkList.Items[3].Selected) ? "Y" : "N") + "'," +
                                          "BackOrderInd='" + ((chkList2.Items[0].Selected) ? "Y" : "N") + "'," +
                                          "EDI870Ind='" + ((chkList2.Items[1].Selected) ? "Y" : "N") + "'," +
                                          "ResidentialDeliveryInd='" + ((chkList2.Items[2].Selected) ? "1" : "0") + "'," +
                                          "PackSlipRequired='" + ((chkList2.Items[3].Selected) ? "Y" : "N") + "'," +
                                          "ChangeDt='" + DateTime.Now.ToShortDateString() + "'," +
                                          "ChangeID='" + Session["UserName"].ToString().Replace("'", "''") + "'";

                    customerDetails.UpdateCustomerDetails(updateString, CustomerID);
                    //BindControls();


                    // Update Change Dt & ID in header section
                    AddressHeader customerHeader = this.Parent.FindControl("ucCustomerHeader") as AddressHeader;
                    customerHeader.SetChangeIDAndDt();

                    UpdatePanel pnHeaderDetails = this.Parent.FindControl("pnHeaderDetails") as UpdatePanel;
                    pnHeaderDetails.Update();
                }
                catch (Exception ex) { }
            }
        }
Example #2
0
        /// <summary>
        /// Code to insert the vendor address details
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ibtnSave_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                try
                {
                    string updateString = "ZeroBalMo='" + txtZeroBalance.Text.Replace("'", "''") + "'," +
                                          "CreditInd='" + txtCreditIndicator.Text.Replace("'", "''") + "'," +
                                          "CreditLmt='" + txtCreditLimeit.Text.Replace("'", "''") + "'," +
                                          "CreditRvwDT='" + dpCreditReviewdt.SelectedDate.Replace("'", "''") + "'," +
                                          "DunsNo='" + txtDunsNo.Text.Replace("'", "''") + "'," +
                                          "DunsRating='" + txtDunsRating.Text.Replace("'", "''") + "'," +
                                          "LateChrgPct=" + ((txtLateCharge.Text == "")?"null":"'" + txtLateCharge.Text.Replace("'", "''") + "'") + "," +
                                          "SvcChrgMo='" + txtServiceCharge.Text.Replace("'", "''") + "'," +
                                          "MultiTaxCd='" + txtMultiTaxCd.Text.Replace("'", "''") + "'," +
                                          "WriteOffDt='" + dpWriteOffDate.SelectedDate.Replace("'", "''") + "'," +
                                          "CashDiscCd='" + ddlCashDiscount.SelectedValue.Trim() + "'," +
                                          "CreditAppInd='" + ddlCreditApp.SelectedValue.Trim() + "'," +
                                          "CreditRvwInd='" + ddlCreditReview.SelectedValue.Trim() + "'," +
                                          "CycBillInd='" + ddlCycleBilling.SelectedValue.Trim() + "'," +
                                          "GLPostCd='" + ddlGLPosting.SelectedValue.Trim() + "'," +
                                          "TaxCd='" + ddlTaxCode.SelectedValue.Trim() + "'," +
                                          "TradeTermCd='" + ddlTradeTerm.SelectedValue.Trim() + "'," +
                                          "SummBillInd='" + ((chkList.Items[0].Selected) ? "Y" : "N") + "'," +
                                          "DelinqInd='" + ((chkList.Items[1].Selected) ? "Y" : "N") + "'," +
                                          "TaxStat='" + ((chkList.Items[2].Selected) ? "Y" : "N") + "'," +
                                          "ChgBackInd='" + ((chkList.Items[3].Selected) ? "Y" : "N") + "'," +
                                          "FinChrgInd='" + ((chkList.Items[4].Selected) ? "Y" : "N") + "'," +
                                          "Rebate='" + ((chkList.Items[5].Selected) ? "Y" : "N") + "'," +
                                          "ChangeDt='" + DateTime.Now.ToShortDateString() + "'," +
                                          "ChangeID='" + Session["UserName"].ToString().Replace("'", "''") + "'";
                    customerDetails.UpdateCustomerDetails(updateString, CustomerID);

                    // Update Change Dt & ID in header section
                    AddressHeader customerHeader = this.Parent.FindControl("ucCustomerHeader") as AddressHeader;
                    customerHeader.SetChangeIDAndDt();

                    UpdatePanel pnHeaderDetails = this.Parent.FindControl("pnHeaderDetails") as UpdatePanel;
                    pnHeaderDetails.Update();
                }
                catch (Exception ex) {   }
            }
        }
Example #3
0
        /// <summary>
        /// Code to insert the vendor address details
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ibtnSave_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                try
                {
                    string updateString = "ContractNo='" + txtContractNo.Text + "'," +
                                          "PriceCd='" + ddlPriceCode.SelectedValue.Trim() + "'," +
                                          "FirstActivityDt='" + dpFirstActivity.SelectedDate + "'," +
                                          "SoldSinceDt='" + dpLastPurchaseDate.SelectedDate + "'," +
                                          "MinBillAmt=" + ((txtMinBillingAmt.Text == "") ? "null" : "'" + txtMinBillingAmt.Text + "'") + "," +
                                          "CustSlsRank='" + ddlSalesRank.SelectedValue.Trim() + "'," +
                                          "ABCCd='" + ddlAbcCode.SelectedValue.Trim() + "'," +
                                          "ChainCd='" + ddlChainCode.SelectedValue.Trim() + "'," +
                                          "CLTradeCd='" + ddlClassTrade.SelectedValue.Trim() + "'," +
                                          "ContractSchd1='" + ddlcSchedule1.SelectedValue.Trim() + "'," +
                                          "ContractSchd2='" + ddlcSchedule2.SelectedValue.Trim() + "'," +
                                          "ContractSchd3='" + ddlcSchedule3.SelectedValue.Trim() + "'," +
                                          "ContractSchedule4='" + ddlcSchedule4.SelectedValue.Trim() + "'," +
                                          "ContractSchedule5='" + ddlcSchedule5.SelectedValue.Trim() + "'," +
                                          "ContractSchedule6='" + ddlcSchedule6.SelectedValue.Trim() + "'," +
                                          "ContractSchedule7='" + ddlcSchedule7.SelectedValue.Trim() + "'," +
                                          "CustomerDefaultPrice='" + ddlCustDefPrice.SelectedValue.Trim() + "'," +
                                          "CustomerPriceInd='" + ddlCustPriceInd.SelectedValue.Trim() + "'," +
                                          "WebDiscountPct='" + ((txtWebDiscPct.Text != "") ? txtWebDiscPct.Text : "0") + "'," +
                                          "WebDiscountInd='" + ((chkWebDiscInd.Checked) ? "1" : "0") + "'," +
                                          "SODocSortInd='" + ddlSODocSort.SelectedValue.Trim() + "'," +
                                          "IRSEINNo='" + txtIRSEINNo.Text + "'," +
                                          "SupportRepNo='" + ddlcSupportRep.SelectedValue.Trim() + "'," +
                                          "CustType='" + ddlCustomerType.SelectedValue.Trim() + "'," +
                                          "DiscTypeCd='" + ddlDiscountType.SelectedValue.Trim() + "'," +
                                          "CustShipLocation='" + ddlIMLocation.SelectedValue.Trim() + "'," +
                                          "InvInstr='" + ddlInvoiceIns.SelectedValue.Trim() + "'," +
                                          "InvDeliveryInd='" + ddlInvDelivery.SelectedValue.Trim() + "'," +
                                          "BuyGroup='" + ddlBuyGroup.SelectedValue.Trim() + "'," +
                                          "RebateGroup='" + ddlRebateGroup.SelectedValue.Trim() + "'," +
                                          "LOB='" + ddlLOB.SelectedValue.Trim() + "'," +
                                          "ReasonCd='" + ddlReasonCode.SelectedValue.Trim() + "'," +
                                          "CustReg='" + ddlRegion.SelectedValue.Trim() + "'," +
                                          "SalesOrgNo='" + ddlSalesOrganization.SelectedValue.Trim() + "'," +
                                          "SlsRepNo='" + ddlSalesRep.SelectedValue.Trim() + "'," +
                                          "SerialNoCd='" + ddlSerialCode.SelectedValue.Trim() + "'," +
                                          "ShipTermsCd='" + ddlShippingTerms.SelectedValue.Trim() + "'," +
                                          "SIC='" + ddlSIC.SelectedValue.Trim() + "'," +
                                          "SalesTerritory='" + ddlTerritory.SelectedValue.Trim() + "'," +
                                          "TypeofOrder='" + ddlTypeOrder.SelectedValue.Trim() + "'," +
                                          "NetPriceInd='" + ((chkList.Items[0].Selected) ? "Y" : "N") + "'," +
                                          "NextPriceInd='" + ((chkList.Items[1].Selected) ? "Y" : "N") + "'," +
                                          "NickelSurChrgInd='" + ((chkList.Items[2].Selected) ? "Y" : "N") + "'," +
                                          "PORequiredInd='" + ((chkList2.Items[0].Selected) ? "1" : "0") + "'," +
                                          "CertRequiredInd='" + ddlCertsInd.SelectedValue + "'," +
                                          "ChangeDt='" + DateTime.Now.ToShortDateString() + "'," +
                                          "ChangeID='" + Session["UserName"].ToString().Replace("'", "''") + "'";

                    customerDetails.UpdateCustomerDetails(updateString, CustomerID);

                    // Update Change Dt & ID in header section
                    AddressHeader customerHeader = this.Parent.FindControl("ucCustomerHeader") as AddressHeader;
                    customerHeader.SetChangeIDAndDt();

                    UpdatePanel pnHeaderDetails = this.Parent.FindControl("pnHeaderDetails") as UpdatePanel;
                    pnHeaderDetails.Update();
                }
                catch (Exception ex) { throw ex; }
            }
        }