Example #1
0
 public virtual void Update(RateParam _rateparam)
 {
     this.Schedules    = _rateparam.Schedules;
     this.TrainClasses = _rateparam.TrainClasses;
     this.Price        = _rateparam.Price;
     this.UpdateBy     = "";//isi
     this.UpdateDate   = DateTimeOffset.Now.LocalDateTime;
 }
Example #2
0
        public string UpdateRateDetais(int RateSNo, string Action, RateDetails RateInfo, List <RateRemarks> RateRemarks, List <RateAirlineSLAB> RateSLABInfoarray, List <RateULDAirlineSLAB> RateULDSLABInfoArray, RateParam RateParamList, string ErrorMSG)
        {
            string Result = "";

            try
            {
                //return null;
                List <RateDetails> lstRateDetails = new List <RateDetails>();
                lstRateDetails.Add(RateInfo);

                List <RateParam> lstRateParam = new List <RateParam>();
                lstRateParam.Add(RateParamList);

                DataTable dtRateDetails = CollectionHelper.ConvertTo(lstRateDetails, "");
                DataTable dtRateRemarks = CollectionHelper.ConvertTo(RateRemarks, "");
                DataTable dtRateSlab    = CollectionHelper.ConvertTo(RateSLABInfoarray, "HdnRateClassSNo");
                DataTable dtRateULDSlab = CollectionHelper.ConvertTo(RateULDSLABInfoArray, "HdnRateClassSNo,HdnULDSNo,HdnRateClassCode,Text_RateClassCode,RateClassCode");
                DataTable dtRateParam   = CollectionHelper.ConvertTo(lstRateParam, "");

                BaseBusiness baseBusiness     = new BaseBusiness();
                SqlParameter paramRateDetails = new SqlParameter();
                paramRateDetails.ParameterName = "@RateDetails";
                paramRateDetails.SqlDbType     = System.Data.SqlDbType.Structured;
                paramRateDetails.Value         = dtRateDetails;

                SqlParameter paramRateRemarks = new SqlParameter();
                paramRateRemarks.ParameterName = "@RateRemarks";
                paramRateRemarks.SqlDbType     = System.Data.SqlDbType.Structured;
                paramRateRemarks.Value         = dtRateRemarks;

                SqlParameter paramRateSlab = new SqlParameter();
                paramRateSlab.ParameterName = "@RateSLAB";
                paramRateSlab.SqlDbType     = System.Data.SqlDbType.Structured;
                paramRateSlab.Value         = dtRateSlab;

                SqlParameter paramRateULDSlab = new SqlParameter();
                paramRateULDSlab.ParameterName = "@RateULDSLAB";
                paramRateULDSlab.SqlDbType     = System.Data.SqlDbType.Structured;
                paramRateULDSlab.Value         = dtRateULDSlab;

                SqlParameter paramRateParam = new SqlParameter();
                paramRateParam.ParameterName = "@RateParam";
                paramRateParam.SqlDbType     = System.Data.SqlDbType.Structured;
                paramRateParam.Value         = dtRateParam;

                DataSet        ds         = new DataSet();
                SqlParameter[] Parameters =
                {
                    new SqlParameter("@RateSNo",       RateSNo),
                    new SqlParameter("@PerformAction", Action),
                    paramRateDetails,
                    paramRateRemarks,
                    paramRateSlab,
                    paramRateULDSlab,
                    paramRateParam,
                    new SqlParameter("@CreatedBy",     ((CargoFlash.Cargo.Model.UserLogin)(System.Web.HttpContext.Current.Session["UserDetail"])).UserSNo.ToString()),
                    new SqlParameter("@UpdatedBy",     ((CargoFlash.Cargo.Model.UserLogin)(System.Web.HttpContext.Current.Session["UserDetail"])).UserSNo.ToString()),
                    new SqlParameter("@ErrorMSg",      ErrorMSG),
                };

                ds = SqlHelper.ExecuteDataset(DMLConnectionString.WebConfigConnectionString, "spRate_UpdateDetails", Parameters);
                return(CargoFlash.Cargo.Business.Common.CompleteDStoJSON(ds));
                // return ds.Tables[ds.Tables.Count - 1].Rows[0][0].ToString();
            }
            catch (Exception ex)//
            {
                throw ex;
            }
            return(Result);
        }