using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Data;
using System.Data.SqlClient;

using Sybase.DataWindow;
using TXSoft.Common;
using TXSoft.ExtPB;
using TXSoft.DataStore;


namespace A8ERP.CaiWu.JinHuoFuKuanDan
{
    public partial class W_Single_List_
    {
        string curpzh = string.Empty;
        string ywflag = string.Empty;
        string curJqdbm = "0";//是否精确到部门
        string curDjlx = string.Empty;
        public W_Single_List_()
        {

        }
        public override void OnLoad()
        {
            base.OnLoad();
            string yhbh = A8ERP.AppService.GetUserID();
            DataWindowChild dwc;
            if (Request["curpzh"] != null && Request["curywlx"] != null)
            {
                curpzh = Request["curpzh"].ToString();
                curDjlx = Request["curywlx"].ToString();
                ywflag = curpzh.Substring(0, 3);
                this.SetParm("flag", ywflag);

                #region 现金银行凭证

                if ("TT".Equals(ywflag.Substring(0, 2)))
                {

                    dw_1.DataWindowObject = "dw_cw_xjyhzhtzd_edit";

                    dw_1.Retrieve(curpzh);

                    dwc = dw_1.GetChild("bmbh");
                    dwc.SetTransaction(this.AdoTransaction);
                    dwc.Retrieve("%", A8ERP.AppService.GetUserID(), "cw");

                    dwc = dw_1.GetChild("tzlx");
                    dwc.SetTransaction(this.AdoTransaction);
                    dwc.Retrieve("xjyh_tzlx");

                    dwc = dw_1.GetChild("tzyhzh");
                    dwc.SetTransaction(this.AdoTransaction);

                    dwc = dw_1.GetChild("zryhzh");
                    dwc.SetTransaction(this.AdoTransaction);
                    dw_1.Modify("title_t.Text='销货费用单'");
                }
                else if (curDjlx == "会员充值")
                {
                    dw_1.DataWindowObject = "da_cw_hyczmx_top";
                    dw_1.Retrieve(curpzh);
                }
                #endregion

            }

            ////增加尺寸
            //if (ywflag.Substring(0, 2) != "TT" && ywflag.Substring(0, 2) != "ZC" && ywflag.Substring(0, 2) != "SR" && ywflag.Substring(0, 2) != "XS" && ywflag.Substring(0, 2) != "XF" && ywflag.Substring(0, 2) != "JF" && ywflag.Substring(0, 2) != "FK")
            //{
            //    Common.DWServiceHelp.Add35CmCol(dw_2, false);

            //}

            dw_1.Modify("DataWindow.Readonly=yes");

        }
    }
}
