Beispiel #1
0
		private Int64 SaveRecord()
		{
			WBranchTransfer clsWBranchTransfer = new WBranchTransfer();
			clsWBranchTransfer.GetConnection();
			lblWBranchTransferNo.Text = Constants.BRANCH_TRANSFER_CODE + CompanyDetails.BECompanyCode + DateTime.Now.Year.ToString() + clsWBranchTransfer.LastTransactionNo();

			WBranchTransferDetails clsDetails = new WBranchTransferDetails();

			clsDetails.WBranchTransferNo = lblWBranchTransferNo.Text;
			clsDetails.WBranchTransferDate = Convert.ToDateTime(lblWBranchTransferDate.Text);
            clsDetails.BranchIDFrom = Convert.ToInt16(cboBranchFrom.SelectedItem.Value);
            clsDetails.BranchIDTo = Convert.ToInt16(cboBranchTo.SelectedItem.Value);
            clsDetails.RequiredDeliveryDate = Convert.ToDateTime(txtRequiredDeliveryDate.Text);
			clsDetails.TransferrerID = Convert.ToInt64(Session["UID"].ToString());
            clsDetails.TransferrerName = Session["Name"].ToString();
            clsDetails.RequestedBy = txtRequestedBy.Text;
			clsDetails.Status = WBranchTransferStatus.Open;
			clsDetails.Remarks = txtRemarks.Text;
			
			Int64 id = clsWBranchTransfer.Insert(clsDetails);
			clsWBranchTransfer.CommitAndDispose();

			return id;
		}