コード例 #1
0
 public frmAddProductSize(ProductSizePresenter preProductSize, Form beforeForm)
 {
     this.preProductSize = preProductSize;
     this.beforeForm     = beforeForm;
     InitializeComponent();
     setSource();
 }
コード例 #2
0
ファイル: frmProductSize.cs プロジェクト: uitstu/ushop
        public frmProductSize()
        {
            InitializeComponent();
            preProductSize = new ProductSizePresenter(this);

            GridView gridView = gridProductSize.FocusedView as GridView;

            foreach (GridColumn col in gridView.Columns)
            {
                col.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
            }
            gridView.GroupPanelText = "Thả một tiêu đề ở đây để nhóm thông tin";

            gridView.BeginSort();
            try
            {
                gridView.ClearGrouping();
                gridView.Columns["PRODUCT_CODE_NAME"].GroupIndex = 0;
            }
            finally
            {
                gridView1.EndSort();
            }

            this.WindowState = FormWindowState.Maximized;
        }
コード例 #3
0
        public frmAddProductSize(ProductSizePresenter preProductSize, Model.PRODUCT_SIZE obj)
        {
            this.preProductSize = preProductSize;
            this.obj            = obj;
            InitializeComponent();

            tboxQuantity.Text = obj.IN_STOCK_QUANTITY.ToString();

            foreach (DataRow d in preProductSize.loadProductDT(false).Rows)
            {
                int proID = Int32.Parse(d[0].ToString().Substring(d[0].ToString().IndexOf('0'), d[0].ToString().Length - d[0].ToString().IndexOf('0')));
                if (obj.PRODUCT_ID.Equals(proID))
                {
                    string str = d[0].ToString() + " - " + d[1].ToString();
                    cboxProduct.Text = str;
                    break;
                }
            }

            cboxSize.Text = obj.SIZE;

            setSource();

            foreach (DataRow d in preProductSize.loadProductDT(false).Rows)
            {
                int proID = Int32.Parse(d[0].ToString().Substring(d[0].ToString().IndexOf('0'), d[0].ToString().Length - d[0].ToString().IndexOf('0')));
                if (obj.PRODUCT_ID.Equals(proID))
                {
                    string str = d[0].ToString() + " - " + d[1].ToString();
                    cboxProduct.Text = str;
                    break;
                }
            }

            if (obj != null)
            {
                cboxProduct.ReadOnly = true;
                cboxSize.ReadOnly    = true;
            }
        }
コード例 #4
0
 public frmAddProductSize(ProductSizePresenter preProductSize, Model.PRODUCT_SIZE obj, Form beforeForm)
     : this(preProductSize, obj)
 {
     this.beforeForm = beforeForm;
 }
コード例 #5
0
 public frmAddProductSize(ProductSizePresenter preProductSize)
 {
     this.preProductSize = preProductSize;
     InitializeComponent();
     setSource();
 }