[ExtJs4.0]数据从excle2003导入到数据库【2-2-2】

if (increaseNumber != reduceNumber)

                            {

                                return ExtjsFormFail("̨²" + (i + 2) + "D?¨®º¨¦¨ª?¦¨´ºy?" + increaseNumber + "?¨ª?" + reduceNumber + "?ºyY?¨¤Ì¨¨ê??ÁD???ê?");

                            }

                            currentAccountInfo.CertificateNumber = table.Rows[i][4].ToString().Trim();

                            currentAccountInfo.Remark = table.Rows[i][5].ToString().Trim();

                            string increaseStationCode = table.Rows[i][6].ToString().Trim();

                            if (!CheckStation(increaseStationCode))//¨¦¡èª?Ì?䨲?¨²ª??¦?º?¤?ä?¨²

                            {

                                return ExtjsFormFail("̨²" + (i + 2) + "D̨²7¢D?¨®ª?Ì?À¨¤??" + increaseStationCode + "??ä?¨²ê??ÁD???ê?");

                            }

                            currentAccountInfo.IncreaseStationCode = table.Rows[i][6].ToString().Trim();

 

                            string reduceStationCode = table.Rows[i][7].ToString().Trim();

                            if (!CheckStation(reduceStationCode))//¨¦¡èª?Ì?䨲?¨²ª??¦?º?¤?ä?¨²

                            {

                                return ExtjsFormFail("̨²" + (i + 2) + "D̨²8¢D?¦¨´ª?Ì?À¨¤??" + reduceStationCode + "??ä?¨²ê??ÁD???ê?");

                            }

                            currentAccountInfo.ReduceStationCode = table.Rows[i][7].ToString().Trim();

                            string typeId = table.Rows[i][8].ToString().Trim();

                            DataDictionaryService dictionaryService = new DataDictionaryService();

                            IList<BasicDataDictionaryInfo> infos = dictionaryService.FindByTypeCode("CurrentAccount");

                            int x = infos.Count;

                            foreach (var Info in infos)//¨ª¤??Ì?¤¨¤¨ªÁ?À¨¨?

                            {

                                if (Info.Name.Trim() == typeId.Trim())

                                {

                                    x--;

                                    currentAccountInfo.TypeId = Info.Id.ToString();//table.Rows[i][8].ToString().Trim();

                                }

                            }

                            if (x == infos.Count)

                            {

                                return ExtjsFormFail("̨²" + (i + 2) + "D̨²9¢D¤¨¤¨ªÁ???" + typeId + "??ä?¨²ê??ÁD???(D?®D?®D¡ä䨪)ê?");

                            }

                            currentAccountInfo.IsDeleted = 0;

                            currentList.Add(currentAccountInfo);

                        }

                    }

                    CurrentAccountBiz.InsertCurrentAccount(currentList);

                }

                return ExtjsFormSuccess();

            }

            catch (Exception ex)

            {

                return ExtjsFormFail("Ì?¨?ºyYº¡ì㨹ê??¨¬¨¦?t¤¨¤¨ª!°¨¬¡ê?¡éêo" + ex.Message);

            }

        }

你可能感兴趣的:(ExtJs,导入判断,js导入)