private void LoadRecord() { Int64 iID = Convert.ToInt64(Common.Decrypt(Request.QueryString["transferinid"], Session.SessionID)); TransferIn clsTransferIn = new TransferIn(); TransferInDetails clsDetails = clsTransferIn.Details(iID); clsTransferIn.CommitAndDispose(); lblTransferInID.Text = clsDetails.TransferInID.ToString(); lblTransferInNo.Text = clsDetails.TransferInNo; lblTransferInDate.Text = clsDetails.TransferInDate.ToString("yyyy-MM-dd HH:mm:ss"); txtRequiredDeliveryDate.Text = clsDetails.RequiredDeliveryDate.ToString("yyyy-MM-dd"); cboSupplier.SelectedIndex = cboSupplier.Items.IndexOf(cboSupplier.Items.FindByValue(clsDetails.SupplierID.ToString())); txtSupplierContact.Text = clsDetails.SupplierContact; txtSupplierTelephoneNo.Text = clsDetails.SupplierTelephoneNo; lblTerms.Text = clsDetails.SupplierTerms.ToString("##0"); switch (clsDetails.SupplierModeOfTerms) { case 0: lblModeOfterms.Text = "Days"; break; case 1: lblModeOfterms.Text = "Months"; break; case 2: lblModeOfterms.Text = "Years"; break; } txtSupplierAddress.Text = clsDetails.SupplierAddress; cboBranch.SelectedIndex = cboBranch.Items.IndexOf(cboBranch.Items.FindByValue(clsDetails.BranchID.ToString())); txtBranchAddress.Text = clsDetails.BranchAddress; txtRemarks.Text = clsDetails.Remarks; }
private void LoadRecord() { Int64 iID = Convert.ToInt64(Common.Decrypt(Request.QueryString["transferinid"], Session.SessionID)); TransferIn clsTransferIn = new TransferIn(); TransferInDetails clsDetails = clsTransferIn.Details(iID); clsTransferIn.CommitAndDispose(); lblTransferInID.Text = clsDetails.TransferInID.ToString(); lblTransferInNo.Text = clsDetails.TransferInNo; lblTransferInDate.Text = clsDetails.TransferInDate.ToString("yyyy-MM-dd HH:mm:ss"); lblRequiredDeliveryDate.Text = clsDetails.RequiredDeliveryDate.ToString("yyyy-MM-dd"); lblSupplierID.Text = clsDetails.SupplierID.ToString(); lblSupplierCode.Text = clsDetails.SupplierCode.ToString(); string stParam = "?task=" + Common.Encrypt("details", Session.SessionID) + "&id=" + Common.Encrypt(clsDetails.SupplierID.ToString(), Session.SessionID); lblSupplierCode.NavigateUrl = Constants.ROOT_DIRECTORY + "/PurchasesAndPayables/_Vendor/Default.aspx" + stParam; lblSupplierContact.Text = clsDetails.SupplierContact; lblSupplierTelephoneNo.Text = clsDetails.SupplierTelephoneNo; lblTerms.Text = clsDetails.SupplierTerms.ToString("##0"); switch (clsDetails.SupplierModeOfTerms) { case 0: lblModeOfterms.Text = "Days"; break; case 1: lblModeOfterms.Text = "Months"; break; case 2: lblModeOfterms.Text = "Years"; break; } lblSupplierAddress.Text = clsDetails.SupplierAddress; lblBranchID.Text = clsDetails.BranchID.ToString(); lblBranchCode.Text = clsDetails.BranchCode; lblBranchAddress.Text = clsDetails.BranchAddress; lblTransferInRemarks.Text = clsDetails.Remarks; txtTransferInDiscountApplied.Text = clsDetails.DiscountApplied.ToString("###0.#0"); cboTransferInDiscountType.SelectedIndex = cboTransferInDiscountType.Items.IndexOf(cboTransferInDiscountType.Items.FindByValue(clsDetails.DiscountType.ToString("d"))); lblTransferInDiscount.Text = clsDetails.Discount.ToString("#,##0.#0"); lblTransferInVatableAmount.Text = clsDetails.VatableAmount.ToString("#,##0.#0"); txtTransferInFreight.Text = clsDetails.Freight.ToString("#,##0.#0"); txtTransferInDeposit.Text = clsDetails.Deposit.ToString("#,##0.#0"); lblTransferInSubTotal.Text = Convert.ToDecimal(clsDetails.SubTotal - clsDetails.VAT + clsDetails.Freight - clsDetails.Deposit).ToString("#,##0.#0"); lblTransferInVAT.Text = clsDetails.VAT.ToString("#,##0.#0"); lblTransferInTotal.Text = clsDetails.SubTotal.ToString("#,##0.#0"); }