コード例 #1
0
        public ActionResult AddDownTime_Entry()
        {
            DownTime_Entry data = new DownTime_Entry();

            data.Emp_Id = 2;
            data.Supoort_Function_Id    = 2;
            ViewData["Employee"]        = binddropdown("Employee", 0);
            ViewData["SupportFunction"] = binddropdown("SupportFunction", 0);
            return(View("AddDownTime_Entry", data));
        }
コード例 #2
0
        public ActionResult AddDownTime_Entry(DownTime_Entry DE)
        {
            ReydeldbContext dbc = new ReydeldbContext();
            var             res = dbc.Database.ExecuteSqlCommand(@"exec USPInsertDownTime_Entry  @Entry_Date, @Calender_Id, @Emp_Id, @IsPlanned, @Planned_from, @Planned_to , @Total_Planned, @Downtime_description, @Supoort_Function_Id,@Downtime_SlipSerialNo, @Downtime_From, @Downtime_to, @Total_Downtime",
                                                                 new SqlParameter("@Entry_Date", DE.Entry_Date),
                                                                 new SqlParameter("@Calender_Id", DE.Calendar_id),
                                                                 new SqlParameter("@Emp_Id", DE.Emp_Id),
                                                                 new SqlParameter("@IsPlanned", DE.IsPlanned),
                                                                 new SqlParameter("@Planned_from", DE.Planned_from),
                                                                 new SqlParameter("@Planned_to", DE.Planned_to),
                                                                 new SqlParameter("@Total_Planned", DE.Total_Planned),
                                                                 new SqlParameter("@Downtime_description", DE.Downtime_description),
                                                                 new SqlParameter("@Supoort_Function_Id", DE.Supoort_Function_Id),
                                                                 new SqlParameter("@Downtime_SlipSerialNo", DE.Downtime_SlipSerialNo),
                                                                 new SqlParameter("@Downtime_From", DE.Downtime_From),
                                                                 new SqlParameter("@Downtime_to", DE.Downtime_to),
                                                                 new SqlParameter("@Total_Downtime", DE.Total_Downtime));

            return(Json("data inserted"));
        }