Beispiel #1
0
        private void FmLoad(object sender, EventArgs e)
        {
            this.InitGrid(GridFile);

            var dal = new MCardDAL();

            var modInfo = dal.GetMomRow(CardNo);

            var cardM = dal.GetCardMain(CardNo);

            string fldr = cardM.cInvCode.Substring(0, 4) + modInfo.cInvCode.Substring(2);

            basePath = Information.FileServerInfo.FtpAddress + "\\" + modInfo.cInvCode + "\\" + fldr;

            this.gridControl1.DataSource = this.GetFileList(basePath);

            this.GridFile.DoubleClick += new EventHandler(new Action <object, EventArgs>((x, y) =>
            {
                var curfile = GridFile.GetFocusedRow() as FileInformaion;
                if (curfile.FileExt == "文件夹")
                {
                    this.curPath = curfile.FileFullName;
                    this.gridControl1.DataSource = this.GetFileList(curPath);
                }
                else
                {
                    ProcessStartInfo info = new ProcessStartInfo();
                    info.WorkingDirectory = basePath;
                    info.FileName         = curfile.FileFullName;
                    Process.Start(info);
                }
            }));
        }
Beispiel #2
0
        private void FmMOReport_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(cardNo))
            {
                throw new Exception("流转卡号不能为空!");
            }
            else if (!dal.Exists(cardNo))
            {
                throw new Exception("流转卡号[" + cardNo + "] 不存在!");
            }

            this.cardM = dal.GetCardMain(cardNo);
            this.LoadData();
        }