public PriceQuestionModel GetPriceQuestion(PriceQuestionModel objPriceQuestionModel)
        {
            DLDocumentResponse objDLDocumentResponse = new DLDocumentResponse();
            DataSet            dt = objDLDocumentResponse.GetPriceQuestion(objPriceQuestionModel);

            if (dt.Tables.Count > 0)
            {
                for (int i = 0; i < dt.Tables[0].Rows.Count; i++)
                {
                    objPriceQuestionModel = GetDataRowToEntity <PriceQuestionModel>(dt.Tables[0].Rows[i]);
                }
            }
            if (objPriceQuestionModel != null)
            {
                objPriceQuestionModel.dtPriceDetails = new List <PriceDetailsQuestionModel>();
                if (dt.Tables.Count > 1)
                {
                    for (int i = 0; i < dt.Tables[1].Rows.Count; i++)
                    {
                        objPriceQuestionModel.dtPriceDetails.Add(GetDataRowToEntity <PriceDetailsQuestionModel>(dt.Tables[1].Rows[i]));
                    }
                }
            }

            return(objPriceQuestionModel);
        }
Beispiel #2
0
        public PriceQuestionModel InsertUpdatePriceQuestion(PriceQuestionModel objPriceQuestionModel)
        {
            try
            {
                DataTable dtPriceDetails = new DataTable();
                dtPriceDetails.Columns.Add("ResultDetailId"); dtPriceDetails.Columns.Add("QuestionId"); dtPriceDetails.Columns.Add("InstAmt");
                dtPriceDetails.Columns.Add("TaxAmt"); dtPriceDetails.Columns.Add("IneteAmt"); dtPriceDetails.Columns.Add("TotalAmt");
                dtPriceDetails.Columns.Add("DateAmt"); dtPriceDetails.Columns.Add("PenaltyAmt");

                for (int i = 0; i < objPriceQuestionModel.dtPriceDetails.Count; i++)
                {
                    dtPriceDetails.Rows.Add(objPriceQuestionModel.dtPriceDetails[i].ResultDetailId, objPriceQuestionModel.dtPriceDetails[i].QuestionId,
                                            objPriceQuestionModel.dtPriceDetails[i].InstAmt, objPriceQuestionModel.dtPriceDetails[i].TaxAmt, objPriceQuestionModel.dtPriceDetails[i].IneteAmt, objPriceQuestionModel.dtPriceDetails[i].TotalAmt, objPriceQuestionModel.dtPriceDetails[i].DateAmt, objPriceQuestionModel.dtPriceDetails[i].PenaltyAmt);
                }

                //Set Param values by objViewParameters
                SqlParameter[] Param =
                {
                    new SqlParameter("@ResultDetailId", objPriceQuestionModel.ResultDetailId),
                    new SqlParameter("@QuestionId",     objPriceQuestionModel.QuestionId),
                    new SqlParameter("@PrintAmt",       objPriceQuestionModel.PrintAmt),
                    new SqlParameter("@PriceAmtText",   objPriceQuestionModel.PriceAmtText),
                    new SqlParameter("@TaxAmt",         objPriceQuestionModel.TaxAmt),
                    new SqlParameter("@TaxAmtText",     objPriceQuestionModel.TaxAmtText),
                    new SqlParameter("@TotalAmt",       objPriceQuestionModel.TotalAmt),
                    new SqlParameter("@TotalText",      objPriceQuestionModel.TotalText),
                    new SqlParameter("@TaxTypeValue",   objPriceQuestionModel.TaxTypeValue),
                    new SqlParameter("@InstNoValue",    objPriceQuestionModel.InstNoValue),
                    new SqlParameter("@TableInnerHTML", objPriceQuestionModel.TableInnerHTML),
                    new SqlParameter("@DivInnerHTML",   objPriceQuestionModel.DivInnerHTML)
                    //new SqlParameter("@FixedAmt",objPriceQuestionModel.FixedAmt)
                    //new SqlParameter("@dtPriceDetails",dtPriceDetails)
                };

                //Call spGetDocumentResponse for Save Procedure
                DataSet dt = SQLHelper.ExecuteDataset(SQLHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, DBConstants.Web_InsertUpdatePriceQuestion, Param);

                return(objPriceQuestionModel);
            }
            catch (Exception ex)
            {
                //throw exception.
                throw ex;
            }
        }
Beispiel #3
0
        public DataSet GetPriceQuestion(PriceQuestionModel objPriceQuestionModel)
        {
            try
            {
                //Set Param values by objViewParameters
                SqlParameter[] Param =
                {
                    new SqlParameter("@ResultDetailId", objPriceQuestionModel.ResultDetailId)
                    ,                                   new SqlParameter("@QuestionId", objPriceQuestionModel.QuestionId)
                };

                //Call spGetDocumentResponse for Save Procedure
                DataSet dt = SQLHelper.ExecuteDataset(SQLHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, DBConstants.Web_GetPriceQuestion, Param);

                return(dt);
            }
            catch (Exception ex)
            {
                //throw exception.
                throw ex;
            }
        }
 public PriceQuestionModel GetPriceQuestion(PriceQuestionModel objPriceQuestionModel)
 {
     return(objBLDocumentResponse.GetPriceQuestion(objPriceQuestionModel));
 }
 public PriceQuestionModel InsertUpdatePriceQuestion(PriceQuestionModel objPriceQuestionModel)
 {
     return(objBLDocumentResponse.InsertUpdatePriceQuestion(objPriceQuestionModel));
 }
        public PriceQuestionModel InsertUpdatePriceQuestion(PriceQuestionModel objPriceQuestionModel)
        {
            DLDocumentResponse objDLDocumentResponse = new DLDocumentResponse();

            return(objDLDocumentResponse.InsertUpdatePriceQuestion(objPriceQuestionModel));
        }