Пример #1
0
        private bool GetCardData(oExcel.Worksheet oxlsheet)
        {
            RankNo       = SEFDataValidation.GetRankNo(CardID, Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 2]).Value2));
            BloodGroupNo = SEFDataValidation.GetBloodGroupNo(Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 6]).Text));
            OrderType    = SEFDataValidation.GetOrderTypeNo(Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 7]).Text));
            ColoumName.Add("RankNo", RankNo.ToString());
            ColoumName.Add("RankText", Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 2]).Value2));
            ColoumName.Add("PersonName", Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 3]).Text));
            ColoumName.Add("MilitaryID", Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 4]).Value2));
            ColoumName.Add("IssueDate", SEFDataValidation.RevDate(Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 5]).Text)));//Issuedate
            ColoumName.Add("BloodGroupNo", BloodGroupNo.ToString());
            ColoumName.Add("BloodGroupText", Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 6]).Text));
            ColoumName.Add("OrderType", Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 7]).Text));
            OrderList.Add(OrderType.ToString());
            OrderList.Add(Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 8]).Value2));
            OrderList.Add(SEFDataValidation.RevDate(Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 9]).Text)));            //OrderDate

            for (int x = 0; x < OrderList.Count; x++)
            {
                if (string.IsNullOrWhiteSpace(OrderList[x]) || string.IsNullOrEmpty(OrderList[x]))
                {
                    OrderList[x] = "0";
                }
            }
            return(true);
        }
Пример #2
0
        private bool GetLicData(oExcel.Worksheet oxlsheet)
        {
            LicType = SEFDataValidation.GetlicType(Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 3]).Text));

            //IssueDate

            ColoumName.Add("IssueDate", SEFDataValidation.RevDate(Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 2]).Text)));
            ColoumName.Add("OrderType", Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 3]).Text));
            OrderList.Add(LicType.ToString());
            OrderList.Add(Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 4]).Value2));
            //orderDate
            OrderList.Add(SEFDataValidation.RevDate(Convert.ToString(((oExcel.Range)oxlsheet.Cells[GrdRow, 5]).Text)));
            for (int x = 0; x < OrderList.Count; x++)
            {
                if (string.IsNullOrWhiteSpace(OrderList[x]) || string.IsNullOrEmpty(OrderList[x]))
                {
                    OrderList[x] = "0";
                }
            }
            return(true);
        }