private Int64 SaveRecord() { BranchTransfer clsBranchTransfer = new BranchTransfer(); clsBranchTransfer.GetConnection(); lblBranchTransferNo.Text = Constants.BRANCH_TRANSFER_CODE + CompanyDetails.BECompanyCode + DateTime.Now.Year.ToString() + clsBranchTransfer.LastTransactionNo(); BranchTransferDetails clsDetails = new BranchTransferDetails(); clsDetails.BranchTransferNo = lblBranchTransferNo.Text; clsDetails.BranchTransferDate = Convert.ToDateTime(lblBranchTransferDate.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 = BranchTransferStatus.Open; clsDetails.Remarks = txtRemarks.Text; Int64 id = clsBranchTransfer.Insert(clsDetails); clsBranchTransfer.CommitAndDispose(); return id; }