예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult CheckRecord(string id)
        {
            DCheckInfo CheckInfo = new DCheckInfo();

            CheckInfo.StrECode = id;
            return(View(CheckInfo));
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult EquipCheck(string id)
        {
            string[]   arr       = id.Split('@');
            DCheckInfo CheckInfo = new DCheckInfo();

            CheckInfo.StrECode        = arr[0];
            CheckInfo.StrCheckCompany = arr[1];
            CheckInfo.StrCheckWay     = arr[2];
            return(View(CheckInfo));
        }
예제 #3
0
        //合并单元格
        //private static void mergeCell(ISheet sheet, int firstRow, int lastRow, int firstCell, int lastCell)
        //{
        //    sheet.AddMergedRegion(new CellRangeAddress(firstRow, lastRow, firstCell, lastCell));//2.0使用 2.0以下为Region
        //}

        //public static HSSFCellStyle SetCellStyle(HSSFWorkbook workbook)
        //{
        //    HSSFCellStyle CellStyle = (HSSFCellStyle)workbook.CreateCellStyle();

        //    //CellStyle.FillForegroundColor = HSSFColor.LAVENDER.index;
        //    CellStyle.WrapText = true;
        //    CellStyle.Alignment = HorizontalAlignment.LEFT;
        //    CellStyle.VerticalAlignment = VerticalAlignment.CENTER;
        //   // fCellStyle.FontIndex = HSSFFont.FONT_ARIAL.;
        //    HSSFFont ffont = (HSSFFont)workbook.CreateFont();
        //    ffont.FontHeight = 20 * 20;
        //    ffont.FontName = "宋体";
        //    ffont.Boldweight = (short)FontBoldWeight.BOLD;

        //    //ffont.Boldweight = ;
        //    //ffont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        //    //CellStyle.BorderBottom = BorderStyle.THIN;

        //    //CellStyle.BorderLeft = BorderStyle.THIN;
        //    //CellStyle.BorderRight = BorderStyle.THIN;
        //    //CellStyle.BorderTop = BorderStyle.THIN;
        //    // fCellStyle .BorderBottom
        //    // ffont.Color = HSSFColor.;
        //    CellStyle.SetFont(ffont);

        //    CellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.CENTER;//.Center;//垂直对齐
        //    CellStyle.FillPattern = FillPatternType.SOLID_FOREGROUND;
        //    return CellStyle;
        //}

        //public void ToWord(DataTable dt, Page page, string filName)
        //{
        //    HttpResponse response = page.Response;
        //    response.Clear();
        //    response.ContentType = "application/msword";
        //    response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        //    response.AddHeader("Content-Disposition","attachment:filename="+System.Web.HttpUtility.UrlEncode(filName,System.Text.Encoding.UTF8)+".doc");
        //    StringBuilder sBuilder = new StringBuilder();
        //    for (int i = 0; i < dt.Rows.Count; i++)
        //    {
        //        sBuilder.Append(dt.Rows[i][1].ToString()+"\n");
        //    }
        //    response.Write(sBuilder.ToString());
        //    response.End();
        //}

        /// <summary>
        ///
        /// </summary>
        /// <param name="CheckInfo"></param>
        /// <param name="Did"></param>
        /// <param name="num"></param>
        /// <returns></returns>
        public ActionResult UpNewCheckInfo(DCheckInfo CheckInfo, string Did, string num)
        {
            string strErr = "";

            if (EquipMan.UpdateNewDCheckInfo(CheckInfo, Did, num, ref strErr) == true)
            {
                return(Json(new { success = "true", Msg = "保存成功" }));
            }
            else
            {
                return(Json(new { success = "false", Msg = "保存出错" + "/" + strErr }));
            }
        }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult UpDCheckInfo(string id)
        {
            string[] arrA = id.Split('@');
            string   Did  = arrA[0];
            string   num  = arrA[1];

            ViewData["Did"] = Did;
            ViewData["num"] = num;
            DCheckInfo CheckInfo = new DCheckInfo();

            CheckInfo = EquipMan.getNewUpdateDCheckInfo(Did);
            return(View(CheckInfo));
        }
예제 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="CheckInfo"></param>
        /// <returns></returns>
        public ActionResult InsertDCheckInfo(DCheckInfo CheckInfo)
        {
            string strErr = "";

            if (EquipMan.InsertNewDCheckInfo(CheckInfo, ref strErr) == true)
            {
                return(Json(new { success = "true", Msg = "保存成功" }));
            }
            else
            {
                return(Json(new { success = "false", Msg = "保存出错" + "/" + strErr }));
            }
        }