Esempio n. 1
0
        public ActionResult SaveMasterInfo(InspNonDispatchMaster objMaster)
        {
            var user = (User)Session["CurrentUser"];
            //objMaster.UserId = user.EMPID;
            //objMaster.UserName = user.EMPID;
            var res = _repository.SaveMasterInfo(objMaster);

            return(Json(res, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        public string SaveMasterInfo(InspNonDispatchMaster objMaster)
        {
            string rv = "";

            try
            {
                var result = Insert_Update_MasterInfo("sp_insert_inspection_non_dispatch_master_info", "SAVE_NON_DISPATCH_MASTER", objMaster);
                rv = Operation.Success.ToString();
                return(result.Rows[0]["NID"].ToString());
            }
            catch (Exception ex)
            {
                rv = ex.Message;
            }
            return(rv);
        }
Esempio n. 3
0
 public DataTable Insert_Update_MasterInfo(string procedure, string callname, InspNonDispatchMaster objMaster)
 {
     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("@NID", objMaster.NID));
     cmd.Parameters.Add(new SqlParameter("@NDate", objMaster.NDate));
     cmd.Parameters.Add(new SqlParameter("@UCode", objMaster.UCode));
     cmd.Parameters.Add(new SqlParameter("@UName", objMaster.UName));
     cmd.Parameters.Add(new SqlParameter("@Remarks", objMaster.Remarks));
     da = new SqlDataAdapter(cmd);
     dt = new DataTable();
     da.Fill(dt);
     dbConn.Close();
     return(dt);
 }
 public string SaveMasterInfo(InspNonDispatchMaster objMaster)
 {
     return(_service.SaveMasterInfo(objMaster));
 }