Пример #1
0
        public bool AddPovertyMSG(Tpoverty model)
        {
            var NowTime = DateTime.Now;

            model.ApplySetTime = NowTime;
            return(povertyDal.AddPovertyMSG(model));
        }
Пример #2
0
        public bool AddPovertyMSG(Tpoverty model)
        {
            var          result           = false;
            const string AddPovertyMSGsql = @"
                               INSERT INTO dbo.Tpoverty
                                        ( ApplyArea, ApplyName,ApplyPhone,ApplyInfo,ApplyValue,Srcimg,ApplySetTime) 
                                VALUES  ( @ApplyArea, 
                                          @ApplyName,
                                          @ApplyPhone,
                                          @ApplyInfo,
                                          @ApplyValue,
                                          @Srcimg,
                                          @ApplySetTime
                                         )";

            try
            {
                using (DbConnection conn = DbFactory.CreateConnection())
                {
                    result = conn.Execute(AddPovertyMSGsql, model) > 0;
                    return(result);
                }
            }
            catch (System.Exception ex)
            {
                throw;
            }
        }
Пример #3
0
        public bool AddProvertyMoneyMSG(Tpoverty model)
        {
            shopmaney.ID = 4;
            int monmey        = Convert.ToInt32(model.ApplyValue);
            var AllMoneymodel = _bendmoneyBll.Scan_AllMoney();

            shopmaney.AllMoney = AllMoneymodel[3].AllMoney + monmey;
            return(TAllmoneylDal.Add_buyshop(shopmaney));
        }
Пример #4
0
        public ActionResult Update_PovertyMSG(Tpoverty model)
        {
            var result  = false;
            int Id      = model.ID;
            var result1 = TAllmoneylBll.Delect_ProvertyMoneyMSG(Id);

            result = _bendpovertyBll.Update_PovertyMSG(model);
            var result2 = TAllmoneylBll.AddProvertyMoneyMSG(model);
            var result0 = TAllmoneylBll.all_buyshop();

            return(RedirectToAction("BendPovertyIndex", "BendPoverty"));
        }
Пример #5
0
        public bool Update_PovertyMSG(Tpoverty model)
        {
            const string Update_PovertyMSGsql = @"
				UPDATE dbo.Tpoverty
				SET	  ApplyArea =@ApplyArea, 
                      ApplyName =@ApplyName,
                      ApplyPhone =@ApplyPhone,
                      ApplyInfo =@ApplyInfo,
                      ApplyValue =@ApplyValue,
                      ApplySetTime =@ApplySetTime
				WHERE ID=@ID"                ;

            using (DbConnection conn = DbFactory.CreateConnection())
            {
                var result = conn.Execute(Update_PovertyMSGsql, model) > 0;
                return(result);
            }
        }
Пример #6
0
        public ActionResult AddPovertyMSG()
        {
            Tpoverty            tpovertyMolde = new Tpoverty();
            NameValueCollection nvc           = System.Web.HttpContext.Current.Request.Form;
            HttpFileCollection  hfc           = System.Web.HttpContext.Current.Request.Files;
            string imgPath = "";

            if (hfc.Count > 0)
            {
                imgPath = "/DataImg/proverty/" + hfc[0].FileName;
                string PhysicalPath = Server.MapPath(imgPath);
                hfc[0].SaveAs(PhysicalPath);
            }
            tpovertyMolde.ApplyArea  = nvc.Get("ApplyArea");
            tpovertyMolde.ApplyInfo  = nvc.Get("ApplyInfo");
            tpovertyMolde.ApplyName  = nvc.Get("ApplyName");
            tpovertyMolde.ApplyPhone = nvc.Get("ApplyPhone");
            tpovertyMolde.ApplyValue = nvc.Get("ApplyValue");
            //tpovertyMolde.ApplyValue = int.Parse(abc);
            tpovertyMolde.Srcimg = imgPath;


            //TAllmoney  tallmoney = new TAllmoney();

            //tallmoney.AllMoney=Convert.ToInt32(tpovertyMolde.ApplyValue);
            //tallmoney.ID = 5;

            //var booluer = false;
            //booluer = _bendpovertyBll.UpdateFivemaneyMSG(tallmoney);

            var result = false;

            result = _bendpovertyBll.AddPovertyMSG(tpovertyMolde);

            var result1 = TAllmoneylBll.AddProvertyMoneyMSG(tpovertyMolde);
            var result0 = TAllmoneylBll.all_buyshop();

            return(Redirect("/BendPoverty/BendPovertyIndex"));
        }
Пример #7
0
 public bool Update_PovertyMSG(Tpoverty model)
 {
     return(povertyDal.Update_PovertyMSG(model));
 }