コード例 #1
0
        public LoomDownTimeMaster SaveLoomDownTimeMaster(LoomDownTimeMaster master)
        {
            var res = new LoomDownTimeMaster();
            var dt  = new DataTable();

            try
            {
                dt             = InsertOrUpdateLoomDownTimeMaster("SP_INSERT_LOOM_DOWN_TIME_MASTER_INFO", "SAVE_LOOM_DOWN_TIME_MASTER", master);
                res.SaveStatus = Operation.Success.ToString();
                res.ID         = Convert.ToInt32(dt.Rows[0]["ID"].ToString());
            }
            catch (Exception ex)
            {
                res.SaveStatus = ex.Message;
            }
            return(res);
        }
コード例 #2
0
        public JsonResult SaveLoomDownTimeMaster(LoomDownTimeMaster master)
        {
            var res = _repository.SaveLoomDownTimeMaster(master);

            return(Json(res, JsonRequestBehavior.AllowGet));
        }
コード例 #3
0
 public LoomDownTimeMaster SaveLoomDownTimeMaster(LoomDownTimeMaster master)
 {
     return(_service.SaveLoomDownTimeMaster(master));
 }
コード例 #4
0
 public DataTable InsertOrUpdateLoomDownTimeMaster(string procedure, string callname, LoomDownTimeMaster master)
 {
     dbConn = new SqlConnection(ConnectionString);
     dbConn.Open();
     cmd             = new SqlCommand(procedure, dbConn);
     cmd.CommandType = CommandType.StoredProcedure;
     cmd.Parameters.Add(new SqlParameter("@call_name", callname));
     cmd.Parameters.Add(new SqlParameter("@ID", master.ID));
     cmd.Parameters.Add(new SqlParameter("@LoomDate", master.LoomDate.ToString("dd/MM/yyyy")));
     cmd.Parameters.Add(new SqlParameter("@Remark", master.Remark));
     cmd.Parameters.Add(new SqlParameter("@EntryBy", master.EntryBy));
     cmd.Parameters.Add(new SqlParameter("@UpdateBy", master.UpdateBy));
     cmd.Parameters.Add(new SqlParameter("@IsDeleted", master.IsDeleted));
     da = new SqlDataAdapter(cmd);
     dt = new DataTable();
     da.Fill(dt);
     dbConn.Close();
     return(dt);
 }