예제 #1
0
 public Result SaveMSTGRN(MSTGRNDTO oMSTGRNDTO)
 {
     try
     {
         using (DbCommand cmd = ERPDAL.Common.dbConn.GetStoredProcCommand("MSTGRNBillSave"))
         {
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@Id", DbType.Int32, oMSTGRNDTO.Id);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@SupplierName", DbType.Int32, oMSTGRNDTO.SupplierName);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@DCBillInvoiceNo", DbType.String, oMSTGRNDTO.DCBillInvoiceNo);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@MDCBillInvoiceDate", DbType.DateTime, oMSTGRNDTO.DcBillInvoiceDate);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@GRNNo", DbType.String, oMSTGRNDTO.GRNNo);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@GRNDate", DbType.DateTime, oMSTGRNDTO.GRNDate);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@LLRRWayBillNo", DbType.String, oMSTGRNDTO.LLRRWayBillNo);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@LLRRWayBillDate", DbType.DateTime, oMSTGRNDTO.LLRRWayBillDate);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@PONo", DbType.String, oMSTGRNDTO.PONo);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@PODate", DbType.DateTime, oMSTGRNDTO.PODate);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@Prepared", DbType.String, oMSTGRNDTO.Prepared);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@StoreIncharge", DbType.String, oMSTGRNDTO.StoreIncharge);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@MaterialManager", DbType.String, oMSTGRNDTO.MaterialManager);
             ERPDAL.Common.dbConn.AddInParameter(cmd, "@PostedIntoStockBy", DbType.String, oMSTGRNDTO.PostedIntoStockBy);
             DataSet dsResult = ERPDAL.Common.dbConn.ExecuteDataSet(cmd);
             Result  res      = new Result {
                 Id = ((dsResult.Tables[0].Rows[0]["Result"])).ToInt(), Message = "Saved", ResultStatus = OperationStatus.SavedSuccessFully
             };
             res.Message = res.Id.ToString();
             return(res);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
        public Result SaveMST(ERPDTOBase obj)
        {
            MSTGRNDTO oMSTGRNDTO = obj as MSTGRNDTO;

            return(new GRNDAL().SaveMSTGRN(oMSTGRNDTO));
        }