예제 #1
0
        public override void BeginCurrent()
        {
            _FixedList_Statistics sta = new _FixedList_Statistics(this.Current, this.Unit);

            sta.DataSource = this.GetDataSource;
            sta.Begin(GetDataSource.Select("PID = " + Current.ID));
        }
예제 #2
0
        public override void Begin(List <int> session)
        {
            if (session != null)
            {
                if (session.Contains(Current.ID))
                {
                    return;
                }
                else
                {
                    session.Add(Current.ID);
                }
            }


            _Entity_SubInfo info = null;
            DataRow         row  = null;
            _Methods        met  = null;

            _FixedList_Statistics sta = new _FixedList_Statistics(this.Current, this.Unit);

            sta.DataSource = this.GetDataSource;
            sta.Begin(GetDataSource.Select("PID = " + Current.ID));


            //计算子目所属节
            info = new _Entity_SubInfo();
            row  = this.Unit.StructSource.ModelSubSegments.GetRowByOther(this.Current.PID.ToString());
            _ObjectSource.GetObject(info, row);
            met = new _Method_Fest(this.CurrentBusiness, this.Unit, info);
            met.Begin(session);
        }
예제 #3
0
        public override void BeginCurrent()
        {
            _FixedList_Statistics sta = new _FixedList_Statistics(this.Current, this.Unit);

            sta.DataSource = this.GetDataSource;
            sta.Begin(GetDataSource.Select("PID = '" + Current.ID + "' AND LB <> '子目-增加费'"));

            if (BeginExtension())
            {
                sta.Begin(GetDataSource.Select("PID = '" + Current.ID + "'"));
            }
        }
예제 #4
0
        public override void Calculate()
        {
            DataRow[] rows = this.GetDataSource.Select(string.Format("PID={0}", this.Current.ID), "", DataViewRowState.CurrentRows);
            foreach (DataRow item in rows)
            {
                _Entity_SubInfo info = new _Entity_SubInfo();
                _ObjectSource.GetObject(info, item);
                _Mothods_MSubheadings met = new _Mothods_MSubheadings(this.CurrentBusiness, this.Unit, info);
                met.Calculate();
            }
            _FixedList_Statistics sta = new _FixedList_Statistics(this.Current, this.Unit);

            sta.DataSource = this.GetDataSource;
            sta.Begin(GetDataSource.Select("PID = '" + Current.ID + "'"));
        }
예제 #5
0
        public ActionResult Getff()
        {
            var filePaths = new List <string>()
            {
                _host.WebRootPath + "/cc.jpg", _host.WebRootPath + "/sy.jpg"
            };

            byte[]       buffer;
            MemoryStream ms = new MemoryStream();

            using (
                ZipFile file = ZipFile.Create(ms))
            {
                file.BeginUpdate();
                file.NameTransform = new MyNameTransfom();
                filePaths.ForEach(t =>
                {
                    var item = new GetDataSource(t);
                    file.Add(item, Path.GetFileName(t));
                });

                file.CommitUpdate();
                buffer      = new byte[ms.Length];
                ms.Position = 0;
                ms.Read(buffer, 0, buffer.Length);
            }

            return(File(buffer, "application/zip", "这是一个打包的文件.zip"));

            //var client = new sRestClient("http://localhost:5001/api");

            //var dic = new Dictionary<string, string>();

            //dic.Add("CompanyId", "中国");

            //int status;

            //var cc = client.Get("account/companyrole", dic, out status);

            //var stude = new student { ID = 34, Name = "张三" };

            //var corse = GetTest.ConvertToCoruse(stude);

            ////get.Get(_host);

            //return corse;
        }