Example #1
0
        public PayReceiptForm(PayReceiptTypeConf conf, ProductCirculationDao cd)
        {
            InitializeComponent();

            openMode     = 0;
            payReceiptID = 0;

            this.conf = conf;

            if (conf.type == PayReceipt.BillType.BuyPay || conf.type == PayReceipt.BillType.SellReceipt)
            {
                this.panel_sum.Visible = false;
            }
            else if (conf.type == PayReceipt.BillType.BuyRefund || conf.type == PayReceipt.BillType.SellRefund)
            {
                this.label_pay_need.Visible = false;
            }

            this.Text                = conf.name + "单";
            this.label_title.Text    = this.Text;
            this.label_customer.Text = conf.customer;

            this.label_date.Text = "开单时间:";

            if (conf.type == PayReceipt.BillType.BuyRefund || conf.type == PayReceipt.BillType.SellRefund)
            {
                this.label_needPayed.Text = conf.cashDirection == -1 ? "退点金额(应付):" : "退点金额(应收):";
            }
            this.label_thisPayed.Text    = conf.cashDirection == -1 ? "本单已付:" : "本单已收:";
            this.label_arrears.Text      = conf.arrearDirection == 1 ? "以上欠款(应付):" : "以上欠款(应收):";
            this.label_accumulative.Text = conf.arrearDirection == 1 ? "累计欠款(应付):" : "累计欠款(应收):";

            this.cirDao = cd;
        }
        public ProductCirculationForm(CirculationTypeConf c, ProductCirculationDao cirDao)
        {
            InitializeComponent();

            openMode      = 0;
            circulationID = 0;

            this.conf = c;

            //有些控件的显示控制,下面还有一个virtual的hideSomeControls
            //除了采购销售,要隐藏一些东西
            if ((int)conf.type > 4)
            {
                this.toolStripButton_print.Visible       = false;
                this.toolStripButton_printLetter.Visible = false;
            }

            int close = 0;

            if (ConfUtility.GetBackFreightOpen() == "backFreightClose")
            {
                this.panel_payBackFreight.Visible = false;
                close++;
            }

            if (ConfUtility.GetLastPayReceiptOpen() == "lastPayReceiptClose")
            {
                this.panel_lastPayReceipt.Visible = false;
                close++;
            }

            if (close == 2)
            {
                this.panel_payBasic.Location = new Point(this.panel_payBasic.Location.X, this.panel_payBasic.Location.Y - 20);
            }

            if (ConfUtility.GetPrintLetterOpen() == "printLetterClose")
            {
                this.toolStripButton_printLetter.Visible = false;
            }

            this.Text             = conf.name + "单";
            this.label_title.Text = this.Text;
            //this.label2.Text = conf.business+"时间:";
            this.label2.Text         = "开单时间:";
            this.label_customer.Text = conf.customer;

            this.label_sum.Text           = conf.productDirection == 1 ? "本单实计应付:" : "本单实计应收:";
            this.label_thisPayed.Text     = conf.productDirection == 1 ? LabelUtility.THIS_PAY : LabelUtility.THIS_RECEIPT;
            this.label_arrears.Text       = conf.arrearsDirection == 1? "以上欠款(应付):":"以上欠款(应收):";
            this.label1_accumulative.Text = conf.arrearsDirection == 1 ? "累计欠款(应付):" : "累计欠款(应收):";

            this.cirDao = cirDao;

            initDatagridview(this.dataGridView1);
        }
        public ProductCirculationListForm(MainForm mf, int type, string title, ProductCirculationDao cirDao)
        {
            InitializeComponent();

            this.mainForm        = mf;
            this.circulationType = type;
            this.Text            = title;

            DateTime dateTime = DateTime.Now;

            this.dateTimePicker3.Value = dateTime.AddMonths(-1);

            this.cirDao = cirDao;

            this.dataGridView1.IsLastRowSort = false;
            this.dataGridView1.Columns["realTotal"].ValueType = typeof(double);

            initCustomerCombox();
            initList();
            this.dataGridView1.Columns["check"].ReadOnly = false;
        }
        //private List<ProductStainlessCirculationRecord> records;

        public ProductStainlessCirculationForm(CirculationTypeConf conf, ProductCirculationDao dao)
            : base(conf, dao)
        {
        }
 public ProductClothesCirculationForm(CirculationTypeConf conf, ProductCirculationDao dao) : base(conf, dao)
 {
 }