public int InsertPassbook(Passbook thePassbook, PassbookPrint thePassbookPrint) { int ReturnValue = 0; using (SqlCommand InsertCommand = new SqlCommand()) { InsertCommand.CommandType = CommandType.StoredProcedure; InsertCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output; InsertCommand.Parameters.Add(GetParameter("@PassbookType", SqlDbType.VarChar, thePassbook.PassBookType)); InsertCommand.Parameters.Add(GetParameter("@PassbookTypeReferenceID", SqlDbType.Int, thePassbook.CustomerAccountID)); InsertCommand.Parameters.Add(GetParameter("@PassbookIssueDate", SqlDbType.VarChar, thePassbook.PassbookIssueDate)); InsertCommand.Parameters.Add(GetParameter("@CoverPageState", SqlDbType.Bit, thePassbook.CoverPageState)); InsertCommand.Parameters.Add(GetParameter("@FirstPageState", SqlDbType.Bit, thePassbook.FirstPageState)); InsertCommand.Parameters.Add(GetParameter("@PrintPosition", SqlDbType.Int, thePassbook.PrintPosition)); InsertCommand.Parameters.Add(GetParameter("@PassbookPage", SqlDbType.VarChar, thePassbookPrint.PassbookPage)); InsertCommand.Parameters.Add(GetParameter("@OfficeID", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.OfficeID)); InsertCommand.Parameters.Add(GetParameter("@AddedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID)); InsertCommand.CommandText = "pCRM_Passbooks_Insert"; ExecuteStoredProcedure(InsertCommand); ReturnValue = int.Parse(InsertCommand.Parameters[0].Value.ToString()); return(ReturnValue); } } //TODO :Requriad @PassbookIssueDate
public static int InsertPassbook(Passbook thePassbook, PassbookPrint thePassbookPrint) { return(PassbookDataAccess.GetInstance.InsertPassbook(thePassbook, thePassbookPrint)); }
public int InsertPassbook(Passbook thePassbook, PassbookPrint thePassbookPrint) { return(PassbookIntegration.InsertPassbook(thePassbook, thePassbookPrint)); }