private void BindPage()
        {
            this.dateEdit1.Properties.Enabled = false;
            this.dateEdit1.EditValue          = DateTime.Today.ToShortDateString();

            //Rp.StockRequestRepository srr = new Rp.StockRequestRepository();
            //IList listBranchTo = srr.GetListByDomainAndExcludeById(typeof(Branch),this.terminalUser.Branch.Id);

            ACMSLogic.StockRequest.StockRequest stockRequest = new ACMSLogic.StockRequest.StockRequest();

            this.lkBranchTo.Properties.DataSource = stockRequest.GetListByDomainAndExcludeById(this.terminalUser.Branch.Id);

            //this.lkBranchTo.Properties.DataSource = listBranchTo;
            //this.lkBranchTo.Properties.ValueMember = "Id";
            //this.lkBranchTo.Properties.DisplayMember = "StrBranchName";

            this.lkBranchTo.Properties.ValueMember   = "strBranchCode";
            this.lkBranchTo.Properties.DisplayMember = "strBranchName";
            this.lkBranchTo.EditValue = "Select Branch";
            this.lkBranchTo.Text      = "Select Branch";



            //add two columns in the dropdown
            LookUpColumnInfoCollection coll = lkBranchTo.Properties.Columns;

            //a column to display values of the ProductID field
//			coll.Add(new LookUpColumnInfo("Id","Branch Code",2));
//			//a column to display values of the ProductName field
//			coll.Add(new LookUpColumnInfo("StrBranchName","Branch Name",50));

            coll.Add(new LookUpColumnInfo("strBranchCode", "Branch Code", 2));
            //a column to display values of the ProductName field
            coll.Add(new LookUpColumnInfo("strBranchName", "Branch Name", 50));


            //set column widths according to their contents
            lkBranchTo.Properties.BestFit();
            //specify the total dropdown width
            lkBranchTo.Properties.PopupWidth = 300;

            //enable auto completion search mode
            //lkBranchTo.Properties.SearchMode = SearchMode.AutoComplete;
            //the column against which to perform the search
            lkBranchTo.Properties.AutoSearchColumnIndex = 0;


            if (this.gridView1.DataRowCount == 0)
            {
                DataRow dr = dt.NewRow();
                dr["strItemCode"] = "Select Product";
                dr["nQuantity"]   = "0";
                dt.Rows.Add(dr);
                this.gridControl1.DataSource = dt;
            }
        }
Beispiel #2
0
        private void BindPage()
        {
            this.dateEdit1.Text = DateTime.Today.ToShortDateString();

            //Rp.StockRequestRepository srr = new Rp.StockRequestRepository();
            //IList listBranchTo = srr.GetListByDomainAndExcludeById(typeof(Branch),this.terminalUser.Branch.Id);
            ACMSLogic.StockRequest.StockRequest stockRequest = new ACMSLogic.StockRequest.StockRequest();

            this.lkBranchTo.Properties.DataSource = stockRequest.GetListByDomainAndExcludeById(this.terminalUser.Branch.Id);
            this.lkBranchTo.Properties.ValueMember = "strBranchCode";
            this.lkBranchTo.Properties.DisplayMember = "strBranchName";
            this.lkBranchTo.EditValue="Select Branch";
            this.lkBranchTo.Text="Select Branch";

            //add two columns in the dropdown
            LookUpColumnInfoCollection coll = lkBranchTo.Properties.Columns;
            //a column to display values of the ProductID field
            coll.Add(new LookUpColumnInfo("strBranchCode","Branch Code",2));
            //a column to display values of the ProductName field
            coll.Add(new LookUpColumnInfo("strBranchName","Branch Name",50));

            //set column widths according to their contents
            lkBranchTo.Properties.BestFit();
            //specify the total dropdown width
            lkBranchTo.Properties.PopupWidth = 300;

            //enable auto completion search mode
            //lkBranchTo.Properties.SearchMode = SearchMode.AutoComplete;
            //the column against which to perform the search
            lkBranchTo.Properties.AutoSearchColumnIndex = 0;

            if(this.gridView1.DataRowCount==0)
            {
                DataRow dr = dt.NewRow();
                dr["strItemCode"]="Select Product";
                dr["nQuantity"]="0";
                dt.Rows.Add(dr);
                this.gridControl1.DataSource = dt;
            }

            #region Disable Code
            //TODO:Check Current Branch
            //IList listBranchTo = srr.GetListByRange(typeof(Branch),"SP");
            //this.lkBranchTo.Properties.DataSource = listBranchTo;
            //this.lkBranchTo.Properties.ValueMember = "Id";
            //this.lkBranchTo.Properties.DisplayMember = "StrBranchName";

            //add two columns in the dropdown
            //LookUpColumnInfoCollection col2 = lkBranchTo.Properties.Columns;
            //a column to display values of the ProductID field
            //col2.Add(new LookUpColumnInfo("Id","Id",2));
            //a column to display values of the ProductName field
            //col2.Add(new LookUpColumnInfo("StrBranchName","Branch Name",50));

            //set column widths according to their contents
            //lkBranchTo.Properties.BestFit();
            //specify the total dropdown width
            //lkBranchTo.Properties.PopupWidth = 300;

            //enable auto completion search mode
            //lkBranchTo.Properties.SearchMode = SearchMode.AutoComplete;
            //the column against which to perform the search
            //lkBranchTo.Properties.AutoSearchColumnIndex = 1;

            //IList listEmployee = srr.GetListByDomain(typeof(Employee));
            //this.lkRequestedBy.Properties.DataSource = listEmployee;
            //this.lkRequestedBy.Properties.DisplayMember = "StrEmployeeName";
            //this.lkRequestedBy.Properties.ValueMember = "Id";

            //add two columns in the dropdown
            //LookUpColumnInfoCollection col3 = lkRequestedBy.Properties.Columns;
            //a column to display values of the ProductID field
            //col3.Add(new LookUpColumnInfo("Id","Id",4));
            //a column to display values of the ProductName field
            //col3.Add(new LookUpColumnInfo("StrEmployeeName","Employee Name",50));

            //set column widths according to their contents
            //lkRequestedBy.Properties.BestFit();
            //specify the total dropdown width
            //lkRequestedBy.Properties.PopupWidth = 300;

            //enable auto completion search mode
            //lkRequestedBy.Properties.SearchMode = SearchMode.AutoComplete;
            //the column against which to perform the search
            //lkRequestedBy.Properties.AutoSearchColumnIndex = 1;

            //IList listIBT = srr.GetListByDomain(typeof(IBT));
            //this.lkIBT.Properties.DataSource = listIBT;
            //this.lkIBT.Properties.DisplayMember = "Id";
            //this.lkIBT.Properties.ValueMember = "Id";

            //add two columns in the dropdown
            //LookUpColumnInfoCollection col4 = lkIBT.Properties.Columns;
            //a column to display values of the ProductID field
            //col4.Add(new LookUpColumnInfo("Id"));

            //set column widths according to their contents
            //lkIBT.Properties.BestFit();

            //enable auto completion search mode
            //lkIBT.Properties.SearchMode = SearchMode.AutoComplete;
            //the column against which to perform the search
            //lkIBT.Properties.AutoSearchColumnIndex = 1;

            //ArrayList _stockRequestStatus = new ArrayList();
            //ACMS.Util.StockRequestStatus[] srs = (ACMS.Util.StockRequestStatus[])Enum.GetValues(typeof(ACMS.Util.StockRequestStatus));
            //this.lkStatus.Properties.DataSource = srs;
            #endregion
        }
        private void BindPage()
        {
            this.dateEdit1.Properties.Enabled=false;
            this.dateEdit1.EditValue = DateTime.Today.ToShortDateString();

            //Rp.StockRequestRepository srr = new Rp.StockRequestRepository();
            //IList listBranchTo = srr.GetListByDomainAndExcludeById(typeof(Branch),this.terminalUser.Branch.Id);

            ACMSLogic.StockRequest.StockRequest stockRequest = new ACMSLogic.StockRequest.StockRequest();

            this.lkBranchTo.Properties.DataSource = stockRequest.GetListByDomainAndExcludeById(this.terminalUser.Branch.Id);

            //this.lkBranchTo.Properties.DataSource = listBranchTo;
            //this.lkBranchTo.Properties.ValueMember = "Id";
            //this.lkBranchTo.Properties.DisplayMember = "StrBranchName";

            this.lkBranchTo.Properties.ValueMember = "strBranchCode";
            this.lkBranchTo.Properties.DisplayMember = "strBranchName";
            this.lkBranchTo.EditValue="Select Branch";
            this.lkBranchTo.Text="Select Branch";

            //add two columns in the dropdown
            LookUpColumnInfoCollection coll = lkBranchTo.Properties.Columns;
            //a column to display values of the ProductID field
            //			coll.Add(new LookUpColumnInfo("Id","Branch Code",2));
            //			//a column to display values of the ProductName field
            //			coll.Add(new LookUpColumnInfo("StrBranchName","Branch Name",50));

            coll.Add(new LookUpColumnInfo("strBranchCode","Branch Code",2));
            //a column to display values of the ProductName field
            coll.Add(new LookUpColumnInfo("strBranchName","Branch Name",50));

            //set column widths according to their contents
            lkBranchTo.Properties.BestFit();
            //specify the total dropdown width
            lkBranchTo.Properties.PopupWidth = 300;

            //enable auto completion search mode
            //lkBranchTo.Properties.SearchMode = SearchMode.AutoComplete;
            //the column against which to perform the search
            lkBranchTo.Properties.AutoSearchColumnIndex = 0;

            if(this.gridView1.DataRowCount==0)
            {
                DataRow dr = dt.NewRow();
                dr["strItemCode"]="Select Product";
                dr["nQuantity"]="0";
                dt.Rows.Add(dr);
                this.gridControl1.DataSource = dt;
            }
        }
Beispiel #4
0
        private void BindPage()
        {
            this.dateEdit1.Text = DateTime.Today.ToShortDateString();

            //Rp.StockRequestRepository srr = new Rp.StockRequestRepository();
            //IList listBranchTo = srr.GetListByDomainAndExcludeById(typeof(Branch),this.terminalUser.Branch.Id);
            ACMSLogic.StockRequest.StockRequest stockRequest = new ACMSLogic.StockRequest.StockRequest();

            this.lkBranchTo.Properties.DataSource    = stockRequest.GetListByDomainAndExcludeById(this.terminalUser.Branch.Id);
            this.lkBranchTo.Properties.ValueMember   = "strBranchCode";
            this.lkBranchTo.Properties.DisplayMember = "strBranchName";
            this.lkBranchTo.EditValue = "Select Branch";
            this.lkBranchTo.Text      = "Select Branch";

            //add two columns in the dropdown
            LookUpColumnInfoCollection coll = lkBranchTo.Properties.Columns;

            //a column to display values of the ProductID field
            coll.Add(new LookUpColumnInfo("strBranchCode", "Branch Code", 2));
            //a column to display values of the ProductName field
            coll.Add(new LookUpColumnInfo("strBranchName", "Branch Name", 50));

            //set column widths according to their contents
            lkBranchTo.Properties.BestFit();
            //specify the total dropdown width
            lkBranchTo.Properties.PopupWidth = 300;

            //enable auto completion search mode
            //lkBranchTo.Properties.SearchMode = SearchMode.AutoComplete;
            //the column against which to perform the search
            lkBranchTo.Properties.AutoSearchColumnIndex = 0;


            if (this.gridView1.DataRowCount == 0)
            {
                DataRow dr = dt.NewRow();
                dr["strItemCode"] = "Select Product";
                dr["nQuantity"]   = "0";
                dt.Rows.Add(dr);
                this.gridControl1.DataSource = dt;
            }

            #region Disable Code
            //TODO:Check Current Branch
            //IList listBranchTo = srr.GetListByRange(typeof(Branch),"SP");
            //this.lkBranchTo.Properties.DataSource = listBranchTo;
            //this.lkBranchTo.Properties.ValueMember = "Id";
            //this.lkBranchTo.Properties.DisplayMember = "StrBranchName";

            //add two columns in the dropdown
            //LookUpColumnInfoCollection col2 = lkBranchTo.Properties.Columns;
            //a column to display values of the ProductID field
            //col2.Add(new LookUpColumnInfo("Id","Id",2));
            //a column to display values of the ProductName field
            //col2.Add(new LookUpColumnInfo("StrBranchName","Branch Name",50));

            //set column widths according to their contents
            //lkBranchTo.Properties.BestFit();
            //specify the total dropdown width
            //lkBranchTo.Properties.PopupWidth = 300;

            //enable auto completion search mode
            //lkBranchTo.Properties.SearchMode = SearchMode.AutoComplete;
            //the column against which to perform the search
            //lkBranchTo.Properties.AutoSearchColumnIndex = 1;


            //IList listEmployee = srr.GetListByDomain(typeof(Employee));
            //this.lkRequestedBy.Properties.DataSource = listEmployee;
            //this.lkRequestedBy.Properties.DisplayMember = "StrEmployeeName";
            //this.lkRequestedBy.Properties.ValueMember = "Id";

            //add two columns in the dropdown
            //LookUpColumnInfoCollection col3 = lkRequestedBy.Properties.Columns;
            //a column to display values of the ProductID field
            //col3.Add(new LookUpColumnInfo("Id","Id",4));
            //a column to display values of the ProductName field
            //col3.Add(new LookUpColumnInfo("StrEmployeeName","Employee Name",50));

            //set column widths according to their contents
            //lkRequestedBy.Properties.BestFit();
            //specify the total dropdown width
            //lkRequestedBy.Properties.PopupWidth = 300;

            //enable auto completion search mode
            //lkRequestedBy.Properties.SearchMode = SearchMode.AutoComplete;
            //the column against which to perform the search
            //lkRequestedBy.Properties.AutoSearchColumnIndex = 1;

            //IList listIBT = srr.GetListByDomain(typeof(IBT));
            //this.lkIBT.Properties.DataSource = listIBT;
            //this.lkIBT.Properties.DisplayMember = "Id";
            //this.lkIBT.Properties.ValueMember = "Id";

            //add two columns in the dropdown
            //LookUpColumnInfoCollection col4 = lkIBT.Properties.Columns;
            //a column to display values of the ProductID field
            //col4.Add(new LookUpColumnInfo("Id"));


            //set column widths according to their contents
            //lkIBT.Properties.BestFit();


            //enable auto completion search mode
            //lkIBT.Properties.SearchMode = SearchMode.AutoComplete;
            //the column against which to perform the search
            //lkIBT.Properties.AutoSearchColumnIndex = 1;


            //ArrayList _stockRequestStatus = new ArrayList();
            //ACMS.Util.StockRequestStatus[] srs = (ACMS.Util.StockRequestStatus[])Enum.GetValues(typeof(ACMS.Util.StockRequestStatus));
            //this.lkStatus.Properties.DataSource = srs;
            #endregion
        }