Exemplo n.º 1
0
        public ActionResult ReportUpdates(int strReportID, string strRemark)
        {
            SZLogisiticsDTO.SZLogisticsEFContainer       LogisticDB = new SZLogisiticsDTO.SZLogisticsEFContainer();
            SZLogisiticsDTO.DataRet.ReturnValue <string> rv         = new SZLogisiticsDTO.DataRet.ReturnValue <string>();
            var retReport = (from hReport in LogisticDB.T_ProductOrder
                             where hReport.F_ID == strReportID
                             select hReport).FirstOrDefault();

            retReport.F_Remark = strRemark;
            retReport.F_Status = "已回复";
            rv.data            = LogisticDB.SaveChanges().ToString();
            return(Json(rv, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        /// <summary>
        /// set product report into database add by YangDu 0902
        /// </summary>
        /// <param name="strProductName"> </param>
        /// <param name="strModel"></param>
        /// <param name="strUnit"></param>
        /// <param name="strPrice"></param>
        /// <param name="strBrandName"></param>
        /// <param name="strDate"></param>
        /// <param name="strDeliveryPlace"></param>
        /// <param name="strRemark"></param>
        /// <param name="strProvider"></param>
        /// <returns></returns>
        public ActionResult HotelReportAdd(string strProductName,
                                           string strModel,
                                           int strUnit,
                                           decimal strPrice,
                                           string strBrandName,
                                           string strDate,
                                           string strDeliveryPlace,
                                           string strRemark,
                                           int strProvider)
        {
            SZLogisiticsDTO.T_ProductOrder ProductVar = new SZLogisiticsDTO.T_ProductOrder()
            {
                F_ProductName = strProductName,
                F_Model       = strModel,
                F_UnitID      = strUnit,
                F_Price       = strPrice,
                F_Brand       = strBrandName,
                F_ImportDate  = Convert.ToDateTime(strDate),
                DeliveryPlace = strDeliveryPlace,
                F_Remark      = strRemark,
                F_ProviderID  = strProvider,
                F_Status      = "请求中"
            };

            SZLogisiticsDTO.SZLogisticsEFContainer       LogisticDB = new SZLogisiticsDTO.SZLogisticsEFContainer();
            SZLogisiticsDTO.DataRet.ReturnValue <string> rv         = new SZLogisiticsDTO.DataRet.ReturnValue <string>();

            try
            {
                LogisticDB.T_ProductOrder.Add(ProductVar);
                int iChanges = LogisticDB.SaveChanges();
                rv.data      = "successful";
                rv.RetStatus = "数据录入成功!";
                rv.RetValue  = "数据录入成功!";
            }
            catch (Exception ex)
            {
                rv.RetStatus = "数据录入失败!";
                rv.RetValue  = ex.ToString();
            }

            return(Json(rv, JsonRequestBehavior.AllowGet));
        }