Esempio n. 1
0
        public int Insert(LendingCarsDetailModel model)
        {
            int Id = 0;

            DataLayer.AtsTotalNewDataContext context = new DataLayer.AtsTotalNewDataContext();
            int    F_IDrequstAmani = (int)model.F_IDrequstAmani;
            int    F_IDCar         = (int)model.F_IDCar;
            int    AcceptanceType  = (int)model.AcceptanceType;
            int    F_color         = (int)model.F_color;
            int    num             = (int)model.num;
            int    radif           = (int)model.radif;
            int    Days            = (int)model.Days;
            int    DelivType       = (int)model.DelivType;
            int    F_Deliver       = (int)model.F_Deliver;
            string NameDeliv       = model.NameDeliv;
            int    F_UsageType     = model.F_UsageType;
            string sql             = @"DECLARE		@Out int
                        EXEC	  [sale].[STP_T00050060];1
		                @F_IDrequstAmani ={0},
	                    @F_IDCar ={1},
	                    @AcceptanceType= {2},
	                    @F_color ={3},
                        @num ={4},
                        @radif ={5},
                        @Days ={6},
                        @DelivType ={7},
                        @F_Deliver ={8},
                        @NameDeliv ={9},
                        @F_UsageType ={10},
	                    @Out = @Out OUTPUT
                        SELECT	@Out as N'@Out'";

            Id = context.ExecuteQuery <int>(sql,
                                            F_IDrequstAmani,
                                            F_IDCar,
                                            AcceptanceType,
                                            F_color,
                                            num,
                                            radif,
                                            Days,
                                            DelivType,
                                            F_Deliver,
                                            NameDeliv,
                                            F_UsageType).FirstOrDefault();
            DataLayer.AtsTotalNewDataContext NewContext = new DataLayer.AtsTotalNewDataContext();
            var query = (from t in NewContext.T00050060s
                         where t.IDDetailReqAmani == Id
                         select t).FirstOrDefault();

            query.status     = 801;
            query.Statusdate = Core.StaticData.DateNow.Date;
            query.StatusTime = Core.StaticData.DateNow.Time;
            NewContext.SubmitChanges();
            return(Id);
        }
Esempio n. 2
0
        public LendingCarsDetailModel GetById(int id)
        {
            LendingCarsDetailModel model = new LendingCarsDetailModel();

            return(model);
        }
Esempio n. 3
0
        public Boolean Update(LendingCarsDetailModel model)
        {
            Boolean Result = false;

            return(Result);
        }