Esempio n. 1
0
        private void FrmGetMaterias_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable dt = CtrlAreas.GetAreaAll().Tables[0];

                LueArea.Properties.DataSource    = dt;
                LueArea.Properties.DisplayMember = "Nombre";
                LueArea.Properties.ValueMember   = "Codigo";

                DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
                col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Nombre", "Nombre", 100);
                //col.SortOrder = DevExpress.Data.ColumnSortOrder.Ascending;
                LueArea.Properties.Columns.Add(col);
                LueArea.ItemIndex = -1;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button2);
                return;
            }

            TxtNombre.Focus();
            if (Modo == "E" && Id > 0)
            {
                CargarDatos(Id);
            }
        }
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();

            DataTable  dt = new DataTable();
            DataColumn c1 = new DataColumn("code", typeof(System.String));
            DataColumn c2 = new DataColumn("name", typeof(System.String));
            DataColumn c3 = new DataColumn("pym", typeof(System.String));
            DataColumn c4 = new DataColumn("pymName", typeof(System.String));

            dt.Columns.Add(c1); dt.Columns.Add(c2); dt.Columns.Add(c3);; dt.Columns.Add(c4);
            DataRow dr = dt.NewRow();

            dr = dt.NewRow(); dr.ItemArray = new object[] { "1", "张山", "zs", "zs张山" }; dt.Rows.Add(dr);
            dr = dt.NewRow(); dr.ItemArray = new object[] { "2", "张三", "zs", "zs张三" }; dt.Rows.Add(dr);
            dr = dt.NewRow(); dr.ItemArray = new object[] { "3", "李四", "ls", "ls李四" }; dt.Rows.Add(dr);
            dr = dt.NewRow(); dr.ItemArray = new object[] { "4", "李胜", "ls", "ls李胜" }; dt.Rows.Add(dr);
            dr = dt.NewRow(); dr.ItemArray = new object[] { "6", "李爽", "ls", "ls李爽" }; dt.Rows.Add(dr);
            dr = dt.NewRow(); dr.ItemArray = new object[] { "7", "王五", "ww", "ww王五" }; dt.Rows.Add(dr);
            //lookUpCmb1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
            //lookUpCmb1.Properties.DisplayMember = "name";
            //lookUpCmb1.Properties.ValueMember = "code";
            //lookUpCmb1.Properties.DataSource = dt;
            //lookUpCmb1.DataSource = dt.Copy();
            //    DevExpress.XtraEditors.Controls.LookUpColumnInfo
            DevExpress.XtraEditors.Controls.LookUpColumnInfo col1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("name", 30, "名称");

            DevExpress.XtraEditors.Controls.LookUpColumnInfo col2 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("code", 30, "代码");
            DevExpress.XtraEditors.Controls.LookUpColumnInfo col3 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("pym", 30, "拼音码");
            DevExpress.XtraEditors.Controls.LookUpColumnInfo col4 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("pymName", 30, "");
            //lookUpCmb1.Properties.Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[] { col1, col2, col3, col4});
        }
        /// <summary>LlenarTablas(String tabla)
        /// Permite inicializar el LookUpEdit (LueOrigenD), con las tablas que pertenecen a la Base de Datos.
        /// Si el parametro (tabla), es diferente de ""; se inicializa el LookUpEdit (LueOrigenD), y se selecciona el nombre de la tabla que viene en el parametro (tabla)
        /// </summary>
        /// <param name="tabla">En este parametro se recibe el nombre de la tabla que se desea selecionar en el LookUpEdit (LueOrigenD) </param>
        public void LlenarTablas(String tabla)
        {
            Funciones f = new Funciones();

            dsTablas = f.GetTables(ConexionDB.getInstancia().Conexion(Dbase, null));
            dtTablas = dsTablas.Tables[0];

            try
            {
                LueOrigenD.Properties.DataSource    = dtTablas;
                LueOrigenD.Properties.DisplayMember = "TABLA";
                LueOrigenD.Properties.ValueMember   = "TABLA";
                DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
                col           = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("TABLA", 10, "Tablas");
                col.SortOrder = DevExpress.Data.ColumnSortOrder.Ascending;
                LueOrigenD.Properties.Columns.Add(col);

                var col2 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Id", 10, "Tablas");
                col2.Visible = false;
                LueOrigenD.Properties.Columns.Add(col2);

                if (!String.IsNullOrEmpty(tabla))
                {
                    LueOrigenD.EditValue = tabla;
                }
                else
                {
                    LueOrigenD.ItemIndex = -1;
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            }
        }
Esempio n. 4
0
        public void Bind_Lookkupedit_Application_Login()
        {
            lookUpEdit3_Application_Login.Properties.DataSource = null;

            Hashtable htParam = new Hashtable();
            DataTable dtParam = new DataTable();

            htParam.Clear();
            dtParam.Clear();

            htParam.Add("@Trans", "BIND_APPLICATION_TYPE");
            dtParam = dataaccess.ExecuteSP("Sp_User", htParam);
            if (dtParam.Rows.Count > 0)
            {
                DataRow dr = dtParam.NewRow();
                dr[0] = 0;
                dr[1] = "SELECT";
                dtParam.Rows.InsertAt(dr, 0);
            }

            lookUpEdit3_Application_Login.Properties.DataSource    = dtParam;
            lookUpEdit3_Application_Login.Properties.DisplayMember = "Application_Login_Type";
            lookUpEdit3_Application_Login.Properties.ValueMember   = "Application_Login_Type_Id";

            DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
            col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Application_Login_Type", 100);
            lookUpEdit3_Application_Login.Properties.Columns.Add(col);
        }
Esempio n. 5
0
        public static void InitDefaultRepositoryLookupEdit(String strTableName, ABCRepositoryLookUpEdit repo)
        {
            DataConfigProvider.TableConfig config = DataConfigProvider.TableConfigList[strTableName];

            #region Columns
            foreach (String strField in config.FieldConfigList.Keys)
            {
                if (config.FieldConfigList[strField].InUse && config.FieldConfigList[strField].IsDefault)
                {
                    DevExpress.XtraEditors.Controls.LookUpColumnInfo col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
                    col.FieldName = strField;
                    col.Caption   = DataConfigProvider.GetFieldCaption(strTableName, strField);
                    col.Visible   = true;
                    repo.Columns.Add(col);
                }
            }
            #endregion

            repo.ValueMember = DataStructureProvider.DataTablesList[strTableName].PrimaryColumn;

            repo.DisplayMember = DataStructureProvider.GetDisplayColumn(strTableName);
            if (String.IsNullOrWhiteSpace(repo.DisplayMember) && repo.Columns.Count > 0)
            {
                repo.DisplayMember = repo.Columns[0].FieldName;
            }

            repo.BestFit();
        }
        private void FrmImprimirBoletin_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable dt2 = CtrlCursos.GetCursoAll().Tables[0];
                LueCurso.Properties.DataSource    = dt2;
                LueCurso.Properties.DisplayMember = "Nombre";
                LueCurso.Properties.ValueMember   = "CodigoCurso";

                DevExpress.XtraEditors.Controls.LookUpColumnInfo col1;
                col1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Nombre", "Nombre", 100);
                LueCurso.Properties.Columns.Clear();
                LueCurso.Properties.Columns.Add(col1);
                LueCurso.ItemIndex = -1;

                DataTable dt3 = CtrlPeriodos.GetPeriodoAll().Tables[0];
                LuePeriodo.Properties.DataSource    = dt3;
                LuePeriodo.Properties.DisplayMember = "Nombre";
                LuePeriodo.Properties.ValueMember   = "CodigoPeriodo";

                DevExpress.XtraEditors.Controls.LookUpColumnInfo col2;
                col2 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Nombre", "Nombre", 100);
                LuePeriodo.Properties.Columns.Add(col2);
                LuePeriodo.ItemIndex = -1;

                LuePeriodo.EditValue = CodPeriodo;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button2);
                return;
            }

            TxtAño.Text = Año.ToString();
        }
Esempio n. 7
0
        public void BindLookUpEdit_Accuracy_Month()
        {
            Hashtable ht_month = new Hashtable();

            System.Data.DataTable dt_month = new System.Data.DataTable();

            lookUpEdit_Accuracy_Month.Properties.DataSource = null;

            ht_month.Add("@Trans", "GET_MONTHS");
            dt_month = dataaccess.ExecuteSP("Sp_Score_Board", ht_month);

            DataRow dr = dt_month.NewRow();

            dr[0] = 0;
            dr[1] = "SELECT";
            dt_month.Rows.InsertAt(dr, 0);

            lookUpEdit_Accuracy_Month.Properties.DataSource    = dt_month;
            lookUpEdit_Accuracy_Month.Properties.DisplayMember = "monthname";
            lookUpEdit_Accuracy_Month.Properties.ValueMember   = "mth";

            DevExpress.XtraEditors.Controls.LookUpColumnInfo col_month;
            col_month = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("monthname", 100);
            lookUpEdit_Accuracy_Month.Properties.Columns.Add(col_month);
        }
Esempio n. 8
0
        private void mdServiceInit()
        {
            fMode = "N";
            string strSQL;

            //strSQL = "select * from tblServiceType";
            //comboBind(mdSV_cbNServiceTypeID,strSQL,"strDescription","nServiceTypeID",true);

            DataTable dt;
            DataSet   _ds;

            _ds    = new DataSet();
            strSQL = "select * from tblServiceType";
            SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "Table" }, new SqlParameter("@strSQL", strSQL));
            dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col[0]    = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nServiceTypeID", "Service Type ID", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
            col[1]    = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription", "Description", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
            myManager = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(repositoryItemLookUpEdit1, dt, col, "strDescription", "nServiceTypeID", "Manager");


            strSQL  = "select A.*,B.strDescription as ServiceTypeName from tblService A inner join tblServiceType B on A.nServiceTypeID=B.nServiceTypeID";
            strSQL += " and (A.strServiceCode like '%" + txtSearch.Text + "%' or  A.strDescription like '%" + txtSearch.Text + "%')";
            _ds     = new DataSet();
            SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "table" }, new SqlParameter("@strSQL", strSQL));
            dtService = _ds.Tables["table"];
            this.gridControlMd_Service.DataSource = dtService;
        }
        private void LueCurso_EditValueChanged(object sender, EventArgs e)
        {
            if (LueCurso.EditValue != null)
            {
                LueMateria.Enabled = true;
                codCurso           = LueCurso.EditValue.ToString();
            }

            try
            {
                RegistroNota regN = new RegistroNota();
                regN.Profesor.CodigoProfesor = codProfesor;
                regN.Curso.CodigoCurso       = codCurso;

                DataTable dt2 = CtrlRegistroNotas.GetMateriasCursosProfe(regN).Tables[0];
                LueMateria.Properties.DataSource    = dt2;
                LueMateria.Properties.DisplayMember = "Nombre";
                LueMateria.Properties.ValueMember   = "CodMateria";

                DevExpress.XtraEditors.Controls.LookUpColumnInfo col1;
                col1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Nombre", "Nombre", 100);
                LueMateria.Properties.Columns.Clear();
                LueMateria.Properties.Columns.Add(col1);
                LueMateria.ItemIndex = -1;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button2);
                return;
            }
        }
Esempio n. 10
0
        public void BindBranch(object editvalue)
        {
            Hashtable ht_branch = new Hashtable();
            DataTable dt_branch = new DataTable();

            //object obj = lookUpEdit1.EditValue;
            //string comp_name = lookUpEdit1.Text;
            //if (obj.ToString() != "0")
            //{
            //    Company_Id = (int)obj;
            //}
            ht_branch.Clear();
            dt_branch.Clear();
            ht_branch.Add("@Trans", "BIND");
            ht_branch.Add("@Company_Id", editvalue);
            dt_branch = dataaccess.ExecuteSP("Sp_Branch", ht_branch);

            DataRow dr = dt_branch.NewRow();

            dr[0] = 0;
            dr[1] = "SELECT";
            dt_branch.Rows.InsertAt(dr, 0);

            lookUpEdit2_Branch.Properties.DataSource    = dt_branch;
            lookUpEdit2_Branch.Properties.DisplayMember = "Branch_Name";
            lookUpEdit2_Branch.Properties.ValueMember   = "Branch_ID";

            DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
            col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Branch_Name", 100);
            lookUpEdit2_Branch.Properties.Columns.Add(col);
        }
Esempio n. 11
0
        private void FrmLogin_Load(object sender, EventArgs e)
        {
            DataSet ds = CtrlPeriodos.GetPeriodoAll();

            if (ds.Tables.Count > 0)
            {
                DataTable dt3 = ds.Tables[0];
                LuePeriodo.Properties.DataSource    = dt3;
                LuePeriodo.Properties.DisplayMember = "Nombre";
                LuePeriodo.Properties.ValueMember   = "CodigoPeriodo";

                DevExpress.XtraEditors.Controls.LookUpColumnInfo col2;
                col2 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Nombre", "Nombre", 100);
                LuePeriodo.Properties.Columns.Add(col2);
                LuePeriodo.ItemIndex = -1;
            }

            int[] años        = new int[20];
            int   añoActual   = DateTime.Now.Year;
            int   inicioCombo = añoActual - 10;

            for (int i = 0; i < años.Length; i++)
            {
                años[i]     = inicioCombo;
                inicioCombo = inicioCombo + 1;
            }

            CmbAño.Properties.Items.AddRange(años);
            CmbAño.SelectedItem = añoActual;
        }
Esempio n. 12
0
        private void frmItem_Edit_Load(object sender, System.EventArgs e)
        {
            DataSet _ds = new DataSet();
            string  strSQL;

            strSQL = "select strPromotionCode, strDescription from TblPromotion";
            SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "table" }, new SqlParameter("@strSQL", strSQL));
            DataTable dt = _ds.Tables["table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strPromotionCode", "Code", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription", "Description", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.luedtItemPromotion.Properties, dt, col, "strDescription", "strPromotionCode", "Promotion");

            _ds    = new DataSet();
            strSQL = "Select * from TblItemPromotion Where strPromotionCode = '" + PromotionCode + "' And strCode = '" + Code + "'";
            SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "table" }, new SqlParameter("@strSQL", strSQL));
            dt = _ds.Tables["table"];

            luedtItemPromotion.EditValue = dt.Rows[0]["strPromotionCode"];
            CategoryTypeID.EditValue     = dt.Rows[0]["nCategoryTypeID"];
            GroupID.EditValue            = dt.Rows[0]["nGroupID"];

            BindCode(CategoryTypeID.EditValue.ToString(), GroupID.EditValue.ToString());
            this.luedtCode.EditValue = dt.Rows[0]["strCode"];
        }
        private void FrmGetProfesorMaterias_Load(object sender, EventArgs e)
        {
            try
            {
                TxtNombreProfe.Text = NombreProfe;

                ProfesorMaterias prMat = new ProfesorMaterias();
                prMat.Profesor.CodigoProfesor = CodProfesor;
                DataTable dt1 = new DataTable();

                dt1 = CtrlProfesorMaterias.GetMateNoAsigNadas(prMat).Tables[0];

                LueMateria.Properties.DataSource    = dt1;
                LueMateria.Properties.DisplayMember = "Nombre";
                LueMateria.Properties.ValueMember   = "CodMateria";

                DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
                col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Nombre", "Nombre", 100);
                LueMateria.Properties.Columns.Add(col);
                LueMateria.ItemIndex = -1;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button2);
                return;
            }
        }
Esempio n. 14
0
        private void RPStaffReport_Load(object sender, System.EventArgs e)
        {
            DataSet _ds = new DataSet();

            string strSQL = "Select distinct year(dtDate) as Year From tblReceipt Order by year(dtDate) desc";

            comboBind(this.cmbYearFrm, strSQL, "Year", "Year", true);
            cmbYearFrm.SelectedIndex = 0;

            comboBind(this.cmbYearTo, strSQL, "Year", "Year", true);
            cmbYearTo.SelectedIndex = 0;

            this.cmbMonthTo.EditValue = DateTime.Today.Month;

            _ds = new DataSet();
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            new ACMS.XtraUtils.LookupEditBuilder.EmployeeIDLookupEditBuilder(luedtRPStaffSalesPerfmEmpID.Properties);

            strSQL = "select * from tblCategory Where nCategoryID In (1,3,5,6,11,12)";
            SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "table" }, new SqlParameter("@strSQL", strSQL));
            DataTable dt = _ds.Tables["table"];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nCategoryID", "Id", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription", "Description", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.luedtRPStaffSalesPerfmCategory.Properties, dt, col, "strDescription", "nCategoryID", "Category");

            LoadReport();
        }
Esempio n. 15
0
        private void FrmGetImprimirPlanilla_Load(object sender, EventArgs e)
        {
            try
            {
                CursoAñoElectivo curAe = new CursoAñoElectivo();
                curAe.AñoElectivo = Año;

                DataTable dt2 = CtrlCursoAñoElectivo.GetCursoAñoElectivo(curAe).Tables[0];

                //DataTable dt2 = CtrlCursos.GetCursoAll().Tables[0];
                LueCurso.Properties.DataSource    = dt2;
                LueCurso.Properties.DisplayMember = "Nombre";
                LueCurso.Properties.ValueMember   = "CodigoCurso";

                DevExpress.XtraEditors.Controls.LookUpColumnInfo col1;
                col1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Nombre", "Nombre", 100);
                LueCurso.Properties.Columns.Clear();
                LueCurso.Properties.Columns.Add(col1);
                LueCurso.ItemIndex = -1;

                dtConsultaPeriodos = CtrlPeriodos.GetPeriodoAll().Tables[0];
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button2);
                return;
            }

            TxtAño.Text = Año.ToString();
        }
Esempio n. 16
0
 private void FillLookUpEditOrderStatus()
 {
     lookUpEditOrderStatus.Properties.DisplayMember = "OrderName";
     lookUpEditOrderStatus.Properties.ValueMember   = "ID_OrderStatus";
     DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
     col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("OrderName", "OrderStatus", 100);
     lookUpEditOrderStatus.Properties.Columns.Add(col);
     lookUpEditOrderStatus.Properties.NullText = "--choose status--";
 }
Esempio n. 17
0
 private void FillLookUpEditPatient()
 {
     lookUpEditPatient.Properties.DisplayMember = "Lastname";
     lookUpEditPatient.Properties.ValueMember   = "ID_Patient";
     DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
     col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Lastname", "Patient", 100);
     lookUpEditPatient.Properties.Columns.Add(col);
     lookUpEditPatient.Properties.NullText = "--choose patient--";
 }
Esempio n. 18
0
 private void FillLookUpEditTestName()
 {
     lookUpEditTestName.Properties.DisplayMember = "TestName";
     lookUpEditTestName.Properties.ValueMember   = "ID_Test";
     DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
     col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("TestName", "Test", 100);
     lookUpEditTestName.Properties.Columns.Add(col);
     lookUpEditTestName.Properties.NullText = "--choose type--";
 }
 private void FillLookUpEditOrder()
 {
     lookUpEditOrder.Properties.DisplayMember = "ID_Order";
     lookUpEditOrder.Properties.ValueMember   = "ID_Order";
     DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
     col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("ID_Order", "OrderOfPatient", 100);
     lookUpEditOrder.Properties.Columns.Add(col);
     lookUpEditOrder.Properties.NullText = "--choose type--";
 }
Esempio n. 20
0
 private void FillLookUpEditGender()
 {
     lookUpEditGender.Properties.DisplayMember = "GenderName";
     lookUpEditGender.Properties.ValueMember   = "ID_Gender";
     DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
     col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("GenderName", "Gender", 100);
     lookUpEditGender.Properties.Columns.Add(col);
     lookUpEditGender.Properties.NullText = "--choose gender--";
 }
 private void FillLookUpEditSpecimentStatus()
 {
     lookUpEditSpecimentStatus.Properties.DisplayMember = "SpecimentStatusName";
     lookUpEditSpecimentStatus.Properties.ValueMember   = "ID_SpecimentStatus";
     DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
     col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("SpecimentStatusName", "SpecimentStatus", 100);
     lookUpEditSpecimentStatus.Properties.Columns.Add(col);
     lookUpEditSpecimentStatus.Properties.NullText = "--choose type--";
 }
Esempio n. 22
0
 private void FillLookUpEditDoctor()
 {
     lookUpEditDoctor.Properties.DisplayMember = "Lastname";
     lookUpEditDoctor.Properties.ValueMember   = "ID_Doctor";
     DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
     col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Lastname", "Doctor", 100);
     lookUpEditDoctor.Properties.Columns.Add(col);
     lookUpEditDoctor.Properties.NullText = "--choose doctor--";
 }
Esempio n. 23
0
 public void SetupLookup()
 {
     lookUpEdit1.Properties.DataSource    = table;
     lookUpEdit1.Properties.DisplayMember = "Name";
     lookUpEdit1.Properties.ValueMember   = "ID";
     DevExpress.XtraEditors.Controls.LookUpColumnInfo col;
     col           = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Name", "Country", 100);
     col.SortOrder = DevExpress.Data.ColumnSortOrder.Ascending;
     lookUpEdit1.Properties.Columns.Add(col);
 }
Esempio n. 24
0
        public OrdersUpdateXFrom(Guid id)
        {
            this.id = id;
            InitializeComponent();
            using (DataContext Db = new DataContext())
            {
                vehList = Db?.Vehicles?.ToList();
                empList = Db?.Employees?.ToList();
                //senList = Db?.SenderUsers?.ToList();
                //callList = Db?.CallUsers?.ToList();
                cusList = Db?.Customers?.ToList();

                EmpLook.Properties.DataSource     = empList;
                VehicleLook.Properties.DataSource = vehList;
                //SenderEmpLook.Properties.DataSource = senList;
                //CallEmpLook.Properties.DataSource = callList;
                CustomerLook.Properties.DataSource = cusList;

                EmpLook.Properties.ValueMember     = "ID";
                VehicleLook.Properties.ValueMember = "ID";
                //SenderEmpLook.Properties.ValueMember = "ID";
                //CallEmpLook.Properties.ValueMember = "ID";
                CustomerLook.Properties.ValueMember = "ID";

                EmpLook.Properties.DisplayMember     = "Name";
                VehicleLook.Properties.DisplayMember = "Number";
                //SenderEmpLook.Properties.DisplayMember = "Username";
                //CallEmpLook.Properties.DisplayMember = "Username";
                CustomerLook.Properties.DisplayMember = "Name";

                DevExpress.XtraEditors.Controls.LookUpColumnInfo nameCol     = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Name");
                DevExpress.XtraEditors.Controls.LookUpColumnInfo numberCol   = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Number");
                DevExpress.XtraEditors.Controls.LookUpColumnInfo usernameCol = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Username");

                EmpLook.Properties.Columns.Add(nameCol);
                CustomerLook.Properties.Columns.Add(nameCol);
                //SenderEmpLook.Properties.Columns.Add(usernameCol);
                //CallEmpLook.Properties.Columns.Add(usernameCol);
                VehicleLook.Properties.Columns.Add(numberCol);


                var order = Db?.FinishedOrders?.SingleOrDefault(s => s.ID == id);
                EarnTxt.Text     = order.Earn.ToString();
                OrderTxt.Text    = order.Details.ToString();
                LocationTxt.Text = order.Location.ToString();

                EmpLook.EditValue      = order.EmployeeID;
                CustomerLook.EditValue = order.CustomerID;
                VehicleLook.EditValue  = order.VehicleID;
                date.Value             = order.Date;
                //SenderEmpLook.EditValue = order.SenderUserID;
                //CallEmpLook.EditValue = order.CallUserID;
            }
        }
Esempio n. 25
0
 private void LoadEmployeeList()
 {
     _ds    = new DataSet();
     strSQL = "select nEmployeeID, strEmployeeName from tblEmployee";
     SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "Table" }, new SqlParameter("@strSQL", strSQL));
     dt = _ds.Tables["Table"];
     DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
     col[0]       = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nEmployeeID", "Employee ID", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
     col[1]       = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strEmployeeName", "Name", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
     myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtEmployee.Properties, dt, col, "strEmployeeName", "nEmployeeID", "Stock");
 }
Esempio n. 26
0
 private void LoadBranchCodeList()
 {
     _ds    = new DataSet();
     strSQL = "select null [strBranchCode],'' [strBranchName] union select strBranchCode, strBranchName from tblBranch";
     _ds    = SqlHelperUtils.ExecuteDatasetText(strSQL, null);
     //SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
     dt = _ds.Tables["Table"];
     DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
     col[0]       = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strBranchCode", "Branch Code", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
     col[1]       = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strBranchName", "Description", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None);
     myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtBranch.Properties, dt, col, "strBranchName", "strBranchCode", "Branch");
 }
Esempio n. 27
0
        public EditFrm(Guid OrderID, Guid?UserID, DataContext context)
        {
            InitializeComponent();

            TimeTxt.EditValueChanged += (sender, e) =>
            {
                TimeSpan now = DateTime.Now.TimeOfDay;
                TimeSpan def = TimeTxt.TimeSpan - now;
                afterTimeLbl.Text = "بعد " + def.Hours + " ساعة و " + def.Minutes + "دقيقة";
            };
            SenderUserID = (Guid)UserID;
            // DataContext.ConnectionString = Settings1.Default.Connection;


            try { hoursCB.SelectedIndex = 0; minCB.SelectedIndex = 30; } catch { }

            List <Vehicle>  vList = context?.Vehicles?.ToList();
            List <Employee> eList = context?.Employees?.Where(s => s.IsBike == true)?.ToList();

            MainOrder = context?.Orders.Include("Customer")?.SingleOrDefault(s => s.ID == OrderID);
            isExist   = MainOrder == null ? false : true;
            if (isExist)
            {
                labelControl4.Text = MainOrder.Details + ": تفاصيل الطلب";
                labelControl3.Text = MainOrder?.CustomerName + ": اسم الزبون";
                labelControl2.Text = MainOrder.Location + ": الموقع";
                lookUpEdit2.Properties.DataSource    = vList;
                lookUpEdit2.Properties.ValueMember   = "ID";
                lookUpEdit2.Properties.DisplayMember = "Number";
                DevExpress.XtraEditors.Controls.LookUpColumnInfo col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Number");
                lookUpEdit2.Properties.Columns.Add(col);
                lookUpEdit1.Properties.DataSource    = eList;
                lookUpEdit1.Properties.ValueMember   = "ID";
                lookUpEdit1.Properties.DisplayMember = "Name";
                DevExpress.XtraEditors.Controls.LookUpColumnInfo col2 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Name");
                lookUpEdit1.Properties.Columns.Add(col2);
                lookUpEdit2.EditValue = MainOrder?.VehicleID;
                lookUpEdit1.EditValue = MainOrder?.EmployeeID;
                earnTE.EditValue      = string.IsNullOrEmpty(MainOrder?.Earn?.ToString()) ? "300" : MainOrder?.Earn?.ToString();
                TimeTxt.EditValue     = MainOrder.BikeTime;
                // textEdit1.EditValue = MainOrder?.Timer;

                if (eList.Count > 0)
                {
                    lookUpEdit1.EditValue = eList[0].ID;
                }
                if (vList.Count > 0)
                {
                    lookUpEdit2.EditValue = eList[0].VehicleID;
                }
            }
            context.Dispose();
        }
Esempio n. 28
0
        private void _LoadWebPage()
        {
            DataTable NhomDT = WebPage.GetActive(_Type);

            lookUpEditPage.Properties.DataSource    = NhomDT;
            lookUpEditPage.Properties.DisplayMember = "Page";
            lookUpEditPage.Properties.ValueMember   = "Page";

            DevExpress.XtraEditors.Controls.LookUpColumnInfo colun0 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
            colun0.Caption   = "Page";
            colun0.FieldName = "Page";
            lookUpEditPage.Properties.Columns.Add(colun0);
        }
Esempio n. 29
0
 private void cmbBirimDoldur()
 {
     DevExpress.XtraEditors.Controls.LookUpColumnInfo kolon1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
     kolon1.Caption = "Birimi";
     kolon1.FieldName = "Adi";
     cmbBirim.Properties.DataSource = null;
     cmbBirim.Properties.Columns.Clear();
     cmbBirim.Properties.Columns.Add(kolon1);
     cmbBirim.Properties.DataSource = new Stok.Services.HamMalzeme().GetAllbyStatus(true);
     cmbBirim.Properties.DisplayMember = "Adi";
     cmbBirim.Properties.ValueMember = "Id";
     cmbBirim.Properties.DataSource = new Stok.Services.Birim().GetAll();
 }
Esempio n. 30
0
 public void SetRecipients(DataTable arr)
 {
     lkMailTo.Properties.DataSource    = arr;
     lkMailTo.Properties.DisplayMember = "Email";
     lkMailTo.Properties.ValueMember   = "ID";
     lkMailTo.Properties.Columns.Clear();
     DevExpress.XtraEditors.Controls.LookUpColumnInfo colun1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
     colun1.Caption   = "Email";
     colun1.FieldName = "Email";
     lkMailTo.Properties.Columns.Add(colun1);
     lkMailTo.ItemIndex = 0;
     //lkMailTo_EditValueChanged(null, null);
 }
Esempio n. 31
0
 public void SetRecipients(DataTable arr)
 {
     lkMailTo.Properties.DataSource = arr;
     lkMailTo.Properties.DisplayMember = "Email";
     lkMailTo.Properties.ValueMember = "ID";
     lkMailTo.Properties.Columns.Clear();
     DevExpress.XtraEditors.Controls.LookUpColumnInfo colun1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
     colun1.Caption = "Email";
     colun1.FieldName = "Email";
     lkMailTo.Properties.Columns.Add(colun1);
     lkMailTo.ItemIndex = 0;
     //lkMailTo_EditValueChanged(null, null);
 }
Esempio n. 32
0
 public EmployeeINFrm(string con)
 {
     InitializeComponent();
     Connection = con;
     using (DataContext Db = new DataContext())
     {
         lookUpEdit1.Properties.DataSource    = Db.Vehicles.ToList();
         lookUpEdit1.Properties.ValueMember   = "ID";
         lookUpEdit1.Properties.DisplayMember = "Number";
         DevExpress.XtraEditors.Controls.LookUpColumnInfo col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Name");
         lookUpEdit1.Properties.Columns.Add(col);
     }
 }
Esempio n. 33
0
        public static void GroupComboListFill(studentform stdform)
        {
            var groupcoll = gebase.GetCollection<groupcolls>("groups");

            var result = groupcoll.FindAll()
                 .SetFields(Fields.Include("number"))
                 .ToList();

            stdform.stgroup.Properties.DataSource = result;
            stdform.stgroup.Properties.DisplayMember = "number";
            stdform.stgroup.Properties.ValueMember = "number";
            stdform.stgroup.Properties.ShowHeader = false;

            var col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("number", 25) { SortOrder = DevExpress.Data.ColumnSortOrder.Ascending };

            stdform.stgroup.Properties.Columns.Add(col);
        }
Esempio n. 34
0
 void cmbTezgahDoldur()
 {
     DevExpress.XtraEditors.Controls.LookUpColumnInfo kolon1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
     kolon1.Caption = "Marka";
     kolon1.FieldName = "Marka";
     DevExpress.XtraEditors.Controls.LookUpColumnInfo kolon2 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
     kolon2.Caption = "Model";
     kolon2.FieldName = "Model";
     DevExpress.XtraEditors.Controls.LookUpColumnInfo kolon3 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
     kolon3.Caption = "Seri No";
     kolon3.FieldName = "SeriNo";
     cmbTezgah.Properties.DataSource = null;
     cmbTezgah.Properties.Columns.Clear();
     cmbTezgah.Properties.Columns.Add(kolon1);
     cmbTezgah.Properties.Columns.Add(kolon2);
     cmbTezgah.Properties.Columns.Add(kolon3);
     cmbTezgah.Properties.DataSource = new Services.Tezgah().GetAll();
     cmbTezgah.Properties.DisplayMember = "Model";
     cmbTezgah.Properties.ValueMember = "Id";
 }
Esempio n. 35
0
        private void LoadMailSetting()
        {
            DataTable dtTable = MailConfig.GetAll();

            lkProfile.Properties.DataSource = dtTable;
            lkProfile.Properties.DisplayMember = "Code";
            lkProfile.Properties.ValueMember = "ID";
            lkProfile.Properties.Columns.Clear();
            DevExpress.XtraEditors.Controls.LookUpColumnInfo colun1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
            colun1.Caption = "Code";
            colun1.FieldName = "Code";
            lkProfile.Properties.Columns.Add(colun1);
            DevExpress.XtraEditors.Controls.LookUpColumnInfo colun2 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
            colun2.Caption = "Mail From";
            colun2.FieldName = "MailFrom";
            lkProfile.Properties.Columns.Add(colun2);
            DevExpress.XtraEditors.Controls.LookUpColumnInfo colun3 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
            colun3.Caption = "Dislay Name";
            colun3.FieldName = "DislayName";
            lkProfile.Properties.Columns.Add(colun3);
            if (dtTable.Rows.Count > 0)
            {
                MailConfig cf = MailConfig.GetByDefault();
                
                if (cf != null)
                {
                    lkProfile.EditValue = int.Parse(cf.ID.ToString());
                }
                else
                {
                    lkProfile.ItemIndex = 0;
                }
            }
            else
            {
                ClearFormInfo();
                SetFormStatus("NEW");
            }
        }
Esempio n. 36
0
        private void _LoadWebPage()
        {
            DataTable NhomDT = WebReg.GetByType(_TypePage);

            lookUpEditPage.Properties.DataSource = NhomDT;
            lookUpEditPage.Properties.DisplayMember = "Page";
            lookUpEditPage.Properties.ValueMember = "ID";

            DevExpress.XtraEditors.Controls.LookUpColumnInfo colun0 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
            colun0.Caption = "Page";
            colun0.FieldName = "Page";
            lookUpEditPage.Properties.Columns.Add(colun0);

            DevExpress.XtraEditors.Controls.LookUpColumnInfo colun1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
            colun1.Caption = "UserName";
            colun1.FieldName = "UserName";
            lookUpEditPage.Properties.Columns.Add(colun1);
            DevExpress.XtraEditors.Controls.LookUpColumnInfo colun2 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
            colun2.Caption = "Password";
            colun2.FieldName = "Password";
            colun2.Width = 40;
            lookUpEditPage.Properties.Columns.Add(colun2);

        }
Esempio n. 37
0
 private void cmbYillarDoldur()
 {
     var kolon1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
     kolon1.Caption = "Yıllar";
     kolon1.FieldName = "Yil";
     cmbBakimYili.Properties.DataSource = null;
     cmbBakimYili.Properties.Columns.Clear();
     cmbBakimYili.Properties.Columns.Add(kolon1);
     cmbBakimYili.Properties.DataSource = new Services.Raporlama().GetBakimYillari();
     cmbBakimYili.Properties.DisplayMember = "Yil";
     cmbBakimYili.Properties.ValueMember = "Yil";
 }
Esempio n. 38
0
        private void Init_Master_lookUp()
        {
            DataSet mds = new DataSet();

            lk_MasterData.Properties.DataSource = "";
            lk_MasterData.Properties.Columns.Clear();

            string strSQL = "select * from tblMasterData where fShow=0 order by pkMasterData";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",mds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
            DataTable dtMaster = mds.Tables["Table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("pkMasterData","Screen ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_MasterData.Properties,dtMaster,col,"strDescription","pkMasterData","Master Data");
        }
Esempio n. 39
0
        private void Init_cmb_Type()
        {
            DataSet _ds = new DataSet();
            string strSQL;

            string strType=cmb_Type.Text;

            strSQL = "select str" + strType + "Code , strDescription from Tbl" + strType + "";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            DataTable dt = _ds.Tables["table"];

            luedtItem.Properties.DataSource = "";
            luedtItem.Properties.Columns.Clear();

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("str" + strType + "Code","Code",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.luedtItem.Properties, dt, col, "strDescription", "str" + strType + "Code", strType);
        }
Esempio n. 40
0
        private void cmbHamMalzemeDoldur()
        {
            DevExpress.XtraEditors.Controls.LookUpColumnInfo kolon1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
            DevExpress.XtraEditors.Controls.LookUpColumnInfo kolon2 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
            kolon2.Caption = "Malzeme Adı";
            kolon2.FieldName = "Adi";
            kolon1.Caption = "Stok Kodu";
            kolon1.FieldName = "No";
            cmbSarjHamMalzeme.Properties.DataSource = null;
            cmbSarjHamMalzeme.Properties.Columns.Clear();
            cmbSarjHamMalzeme.Properties.Columns.Add(kolon1);
            cmbSarjHamMalzeme.Properties.Columns.Add(kolon2);
            cmbSarjHamMalzeme.Properties.DataSource = new Stok.Services.HamMalzeme().GetAllbyStatus(true);
            cmbSarjHamMalzeme.Properties.DisplayMember = "No";
            cmbSarjHamMalzeme.Properties.ValueMember = "Id";

            cmbHamMalzeme.Properties.DataSource = null;
            cmbHamMalzeme.Properties.Columns.Clear();
            cmbHamMalzeme.Properties.Columns.Add(kolon1);
            cmbHamMalzeme.Properties.Columns.Add(kolon2);
            cmbHamMalzeme.Properties.DataSource = new Stok.Services.HamMalzeme().GetAllbyStatus(true);
            cmbHamMalzeme.Properties.DisplayMember = "No";
            cmbHamMalzeme.Properties.ValueMember = "Id";
        }
Esempio n. 41
0
        private void load_EmployeeList()
        {
            DataSet _ds = new DataSet();
            string strSQL;

            strSQL = "select nEmployeeID, strEmployeeName from TblEmployee where nStatusID=1 and fSalesPerson=1";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            DataTable dt = _ds.Tables["table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nEmployeeID","ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strEmployeeName","Employee Name",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            //new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.luedtItemPromotion.Properties, dt, col, "strDescription", "strPromotionCode", "Promotion");

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_Employee.Properties,dt,col,"strEmployeeName","nEmployeeID","Employee Name");
        }
        void BindGuarantor()
        {
            GuarantorFinancerManager oManager = new GuarantorFinancerManager();
            DataTable dtGuarantor = new DataTable();

            oManager.ConnectionString = this.ConnectionString;
            oManager.Open();

            dtGuarantor = oManager.GetGuarantorInfo();

            oManager.Close();

            cboGuarantorFinancer.Properties.DataSource = dtGuarantor;
            cboGuarantorFinancer.Properties.DisplayMember = "GuarantorFinancerName";
            cboGuarantorFinancer.Properties.ValueMember = "GuarantorFinancerName";

            DevExpress.XtraEditors.Controls.LookUpColumnInfo col;

            col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("GuarantorFinancerCode", "Code", 100);

            cboGuarantorFinancer.Properties.Columns.Add(col);

            col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("GuarantorFinancerName", "Name", 100);

            cboGuarantorFinancer.Properties.Columns.Add(col);

            cboGuarantorFinancer.Refresh();
        }
Esempio n. 43
0
        private void lk_CalMethod_Init()
        {
            DataSet _ds = new DataSet();
            string strSQL;

            strSQL = "select * from tblCommCalculation";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            DataTable dt = _ds.Tables["table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nCalMethod","Method ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lk_CalMethod,dt,col,"strDescription","nCalMethod","Method");
        }
Esempio n. 44
0
        private void mdPromotionInit()
        {
            DataSet _ds = new DataSet();
            string strSQL;
            string Condition = "";

            strSQL = "select * from tblDiscountCategory";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            DataTable dt = _ds.Tables["table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nDiscountCategoryID","Discount Category Id",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lk_DiscountCategory,dt,col,"strDescription","nDiscountCategoryID","Discount Category");

            strSQL = "select * from tblPromotion where strPromotionCode like '%" + txtSearch.Text + "%' or  strDescription like '%" + txtSearch.Text +"%'";
            _ds = new DataSet();
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dtPromotion = _ds.Tables["table"];
            gridControlMd_Promotion.DataSource = dtPromotion;
            strSQL = "select strPackageCode,strDescription from (select strPackageCode,strDescription from tblPackage Where strPackageCode Not In (Select strPackageCode From tblPromotionPackage Where strPromotionCode = '" + txtSearch.Text + "') union select strCreditPackageCode as strPackageCode,strDescription from tblCreditPackage Where strCreditPackageCode Not In (Select strPackageCode From tblPromotionPackage Where strPromotionCode = '" + txtSearch.Text + "')) t";
            if (this.txtPcItemCode.EditValue.ToString() != "")
                Condition = " strPackageCode like '%" + this.txtPcItemCode.EditValue + "%' And";

            if (this.txtPcItemDesc.EditValue.ToString() != "")
                Condition += " strDescription like '%" + this.txtPcItemDesc.EditValue + "%' And";

            if (Condition != "")
                strSQL = strSQL + " WHERE " + Condition.Substring(0, Condition.Length - 4);
            _ds = new DataSet();
            SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "table" }, new SqlParameter("@strSQL", strSQL));
            gdPackage.DataSource = _ds.Tables["table"];

            strSQL = "select A.strPackageCode,strDescription,nMaxQty from tblPromotionPackage A join tblPackage B on A.strPackageCode=B.strPackageCode where strPromotionCode='" + txtSearch.Text + "' union select A.strPackageCode,strDescription,nMaxQty from tblPromotionPackage A join tblCreditPackage B on A.strPackageCode=B.strCreditPackageCode where strPromotionCode='" + txtSearch.Text + "'";
            if (this.txtPcItemCode.EditValue.ToString() != "")
                Condition = " B.strPackageCode like '%" + this.txtSearch.Text + "%' And";

            if (this.txtPcItemDesc.EditValue.ToString() != "")
                Condition += " B.strDescription like '%" + this.txtSearch.Text + "%' And";
            if (Condition != "")
                strSQL = strSQL + " And " + Condition.Substring(0, Condition.Length - 4);

            _ds = new DataSet();
            SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "table" }, new SqlParameter("@strSQL", strSQL));
            dtPackage = _ds.Tables["table"];
            gdPackage2.DataSource = dtPackage;
        }
Esempio n. 45
0
        private void mdPromotionInit()
        {
            DataSet _ds = new DataSet();
            string strSQL;

            strSQL = "select * from tblDiscountCategory";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            DataTable dt = _ds.Tables["table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nDiscountCategoryID","Discount Category Id",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lk_DiscountCategory,dt,col,"strDescription","nDiscountCategoryID","Discount Category");

            strSQL = "select * from tblPromotion where strPromotionCode like '%" + txtSearch.Text + "%' or  strDescription like '%" + txtSearch.Text +"%'";
            _ds = new DataSet();
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dtPromotion = _ds.Tables["table"];
            gridControlMd_Promotion.DataSource = dtPromotion;
        }
Esempio n. 46
0
        private void frmItem_Edit_Load(object sender, System.EventArgs e)
        {
            DataSet _ds = new DataSet();
            string strSQL;

            strSQL = "select strPromotionCode, strDescription from TblPromotion";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            DataTable dt = _ds.Tables["table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strPromotionCode","Code",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.luedtItemPromotion.Properties, dt, col, "strDescription", "strPromotionCode", "Promotion");

            _ds = new DataSet();
            strSQL = "Select * from TblItemPromotion Where strPromotionCode = '" + PromotionCode + "' And strCode = '" + Code + "'";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["table"];

            luedtItemPromotion.EditValue = dt.Rows[0]["strPromotionCode"];
            CategoryTypeID.EditValue = dt.Rows[0]["nCategoryTypeID"];
            GroupID.EditValue = dt.Rows[0]["nGroupID"];

            BindCode(CategoryTypeID.EditValue.ToString(),GroupID.EditValue.ToString());
            this.luedtCode.EditValue = dt.Rows[0]["strCode"];
        }
Esempio n. 47
0
        void BindPayDayCode()
        {
            PayDayCodeManager oManager = new PayDayCodeManager();
            DataTable dtLines = new DataTable();

            oManager.ConnectionString = this.ConnectionString;
            oManager.Open();

            dtLines = oManager.GetPayDayCodeHeader();

            cboPayDayCode.Properties.DataSource = dtLines;
            cboPayDayCode.Properties.DisplayMember = "Remarks";
            cboPayDayCode.Properties.ValueMember = "PayDayCode";

            DevExpress.XtraEditors.Controls.LookUpColumnInfo col;

            col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("PayDayCode", "Code", 100);
            cboPayDayCode.Properties.Columns.Add(col);
            col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Remarks", "Name", 100);

            cboPayDayCode.Properties.Columns.Add(col);
            cboPayDayCode.Refresh();

            oManager.Close();
        }
Esempio n. 48
0
		private void frmNewActivities_Load(object sender, System.EventArgs e)
		{
			DataSet _ds = new DataSet();
			string strSQL;

			strSQL = "select * from tblCourse where fValid=0";
			SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
			DataTable dt = _ds.Tables["table"];
			
			DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
			
			col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nCourseID","Course ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
			col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

			//new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.luedtItemPromotion.Properties, dt, col, "strDescription", "strPromotionCode", "Promotion");

			new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_ActCourse.Properties,dt,col,"strDescription","nCourseID","Course Selection");		
	
		}
Esempio n. 49
0
        private void BindCode(string CatID, string GroupID)
        {
            DataSet _ds = new DataSet();
            string strSQL;
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            lk_Code.DataSource = "";

            if (CatID == "1" && GroupID == "0")
            {
                strSQL = "select strProductCode as strCode, strDescription from TblProduct";
                SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
                DataTable dt = _ds.Tables["table"];

                col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strCode","Code",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_Code, dt, col, "strDescription", "strCode", "Product");
            }
            else if (CatID == "1" && GroupID == "1")
            {
                strSQL = "select nProductTypeID as strCode, strDescription from TblProductType";
                SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
                DataTable dt = _ds.Tables["table"];

                col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strCode","Product Type",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_Code, dt, col, "strDescription", "strCode", "Product Type");
            }
            else if (CatID == "2" && GroupID == "0")
            {
                strSQL = "select strPackageCode as strCode, strDescription From tblPackage";
                SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
                DataTable dt = _ds.Tables["table"];

                col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strCode","Code",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_Code, dt, col, "strDescription", "strCode", "Package");
            }
            else if (CatID == "2" && GroupID == "1")
            {
                strSQL = "select nCategoryID as strCode, strDescription From tblCategory";
                SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
                DataTable dt = _ds.Tables["table"];

                col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strCode","Code",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_Code, dt, col, "strDescription", "strCode", "Package");
            }
            else if (CatID == "3" && GroupID == "0")
            {
                strSQL = "select strPackageGroupCode as strCode, strDescription From tblpackagegroup";
                SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
                DataTable dt = _ds.Tables["table"];

                col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strCode","Code",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_Code, dt, col, "strDescription", "strCode", "Package Group");
            }
            else if (CatID == "3" && GroupID == "1")
            {
                strSQL = "select distinct tblpackagegroup.ncategoryid as strCode, tblpackagegroup.strDescription from tblpackagegroup Inner Join TblCategory On TblCategory.nCategoryID = TblPackageGroup.nCategoryID";
                SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
                DataTable dt = _ds.Tables["table"];

                col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strCode","Id",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_Code, dt, col, "strDescription", "strCode", "Category");
            }
            else if (CatID == "4" && GroupID == "0")
            {
                strSQL = "select strCreditPackageCode as strCode, strDescription from tblcreditpackage";
                SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
                DataTable dt = _ds.Tables["table"];

                col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strCode","Code",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_Code, dt, col, "strDescription", "strCode", "Credit Package");
            }
            else if (CatID == "4" && GroupID == "1")
            {
                strSQL = "select distinct tblCreditPackage.ncategoryid as strCode, tblCreditPackage.strDescription from tblCreditPackage Inner Join TblCategory On TblCategory.nCategoryID = tblCreditPackage.nCategoryID";
                SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
                DataTable dt = _ds.Tables["table"];

                col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strCode","Id",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
                new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_Code, dt, col, "strDescription", "strCode", "Category");
            }
        }
Esempio n. 50
0
        private void _LoadWebPage()
        {
            DataTable NhomDT = WebPage.GetActive(_Type);

            lookUpEditPage.Properties.DataSource = NhomDT;
            lookUpEditPage.Properties.DisplayMember = "Page";
            lookUpEditPage.Properties.ValueMember = "Page";

            DevExpress.XtraEditors.Controls.LookUpColumnInfo colun0 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
            colun0.Caption = "Page";
            colun0.FieldName = "Page";
            lookUpEditPage.Properties.Columns.Add(colun0);

        }
Esempio n. 51
0
        private void frmPromotionItem_Load(object sender, System.EventArgs e)
        {
            DataSet _ds = new DataSet();
            string strSQL;

            strSQL = "select strPromotionCode, strDescription from TblPromotion";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            DataTable dt = _ds.Tables["table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strPromotionCode","Code",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_PromotionCode, dt, col, "strDescription", "strPromotionCode", "Promotion");

            BindGrid();
            DataRow row = this.gridViewMd_ItemPromotion.GetDataRow(gridViewMd_ItemPromotion.FocusedRowHandle);
            BindCode(row["nCategoryTypeID"].ToString(),row["nGroupID"].ToString());
        }
Esempio n. 52
0
        private void LoadClassTypeList()
        {
            _ds = new DataSet();
            strSQL = "select null [nClassTypeID],'' [strDescription] union select nClassTypeID, strDescription from tblClassType";

            _ds = SqlHelperUtils.ExecuteDatasetText(strSQL,null);
            //SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nClassTypeID","Class Type",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtClassType.Properties,dt,col,"strDescription","nClassTypeID","ClassType");
        }
Esempio n. 53
0
        private void BindCombo()
        {
            DataTable dt;

            string strSQL = "select * from tblEmployee";
            DataSet _ds = new DataSet();
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nEmployeeID","Employee Id",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strEmployeeName","Employee Name",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lk_EmployeeID,dt,col,"strEmployeeName","nEmployeeID","Manager");

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_RightLevelEmployeeID,dt,col,"strEmployeeName","nEmployeeID","Manager");

            strSQL = "select strBranchCode, strBranchName from tblBranch";
            _ds = new DataSet();
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["table"];
            myBranch = new ACMS.XtraUtils.LookupEditBuilder.BranchCodeLookupEditBuilder(dt,lk_BranchID);

            strSQL = "select nRightsID, strDescription from tblRights";
            _ds = new DataSet();
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["table"];

            col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nRightsID","Rights Id",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_Rights,dt,col,"strDescription","nRightsID","Rights");

            strSQL = "select nRightsLevelID, strDescription from tblRightsLevel";
            _ds = new DataSet();
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["table"];

            col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nRightsLevelID","Rights Level Id",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_RightsLevel,dt,col,"strDescription","nRightsLevelID","Rights");
        }
Esempio n. 54
0
        private void LoadInstructorList()
        {
            _ds = new DataSet();
            strSQL = "select null [nEmployeeID],'' [strEmployeeName] union select nEmployeeID, strEmployeeName from tblEmployee where fInstructor=1 order by strEmployeeName";
            _ds.Tables.Add("Table");
            _ds = SqlHelperUtils.ExecuteDatasetText(strSQL,null);

            //(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nEmployeeID","Employee ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strEmployeeName","Name",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtInstructor.Properties,dt,col,"strEmployeeName","nEmployeeID","Instructor");
        }
Esempio n. 55
0
        private void mdInstructorTypeCommissionInit()
        {
            DataTable dt;
            DataSet _ds;

            _ds = new DataSet();
            string strSQL = "select * from tblInstructorCommission";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nCommissionTypeID","Commission Type ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            myManager = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(repositoryItemLookUpEdit2,dt,col,"strDescription","nCommissionTypeID","Manager");

            _ds = new DataSet();
            strSQL = "select * from tblInstructorType";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col1[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nInstructorTypeID","Instructor Type ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col1[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            myManager = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(repositoryItemLookUpEdit1,dt,col1,"strDescription","nInstructorTypeID","Manager");

            strSQL = "select A.*,B.strDescription as strITDescription, C.strDescription as strCommDescription from tblInstructorTypeCommission A join tblInstructorType B on A.nInstructorTypeID=B.nInstructorTypeID join tblInstructorCommission C on A.nCommissionTypeID=C.nCommissionTypeID";
            _ds = new DataSet();
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dtInstructorCommission=_ds.Tables["table"];
            gridControlMd_InstructorTypeCommission.DataSource = dtInstructorCommission;
        }
Esempio n. 56
0
        private void lookup_Report(int ReportID)
        {
            DataSet mdr = new DataSet();

            lk_ReportView.Properties.DataSource = "";
            lk_ReportView.Properties.Columns.Clear();

            string strSQL = "select * from tblReportView where nReportID=" + ReportID +" and fShow=0 order by nReportID,strReportCode";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",mdr,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL));
            DataTable dtMaster = mdr.Tables["Table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strReportCode","Screen ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strReportName","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_ReportView.Properties,dtMaster,col,"strReportName","strReportCode","Report");
        }
Esempio n. 57
0
        private void frmPackage_Load(object sender, System.EventArgs e)
        {
            DataSet _ds = new DataSet();
            string strSQL;

            //strSQL = "select * from tblcategory where strDescription in ('Fitness Package','Fitness GIRO','PT Package','SPA Package','SPA Single Treatment','IPL Package','Courses & Events','Others','Spa Credit Package','Spa Credit Account','Fitness Combo Package','SPA Combo Package','Spa GIRO','Amore Holistic Credit')";
            strSQL = "select * from tblcategory where strDescription in ('Fitness Package','Fitness GIRO','PT Package','SPA Package','SPA Single Treatment','IPL Package','Courses & Events','Others','Spa Credit Package','Spa Credit Account','Fitness Combo Package','SPA Combo Package','Spa GIRO','Holistic Fitness','Holistic Spa')";
            comboBind(ddlPackageCategory,strSQL,"strDescription","nCategoryID");

            strSQL = "select * from tblcategory where strDescription in ('Fitness Package','Fitness GIRO','PT Package','SPA Package','SPA Single Treatment','IPL Package','Courses & Events','Others','Spa Credit Account','Spa GIRO')";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            DataTable dt = _ds.Tables["table"];

            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nCategoryID","Category Id",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_Category, dt, col, "strDescription", "nCategoryID", "Category");

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_CreditCategoryID, dt, col, "strDescription", "nCategoryID", "Category");

            strSQL = "select * from tblcategory where strDescription in ('Fitness Combo Package','SPA Combo Package')";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["table"];

            col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nCategoryID","Category Id",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lk_pkGroupCatID,dt,col,"strDescription","nCategoryID","Category");

            strSQL = "select strPackageCode, strDescription from TblPackage";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["table"];

            col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];

            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strPackageCode","Package Code",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);

            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lk_PackageCode,dt,col,"strDescription","strPackageCode","Package Code");
            new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lk_GrpPackageCode,dt,col,"strDescription","strPackageCode","Package Code");

            LoadPackage();
        }
Esempio n. 58
0
        private void mdServiceInit()
        {
            fMode="N";
            string strSQL;

            //strSQL = "select * from tblServiceType";
            //comboBind(mdSV_cbNServiceTypeID,strSQL,"strDescription","nServiceTypeID",true);

            DataTable dt;
            DataSet _ds;

            _ds = new DataSet();
            strSQL = "select * from tblServiceType";
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
            dt = _ds.Tables["Table"];
            DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
            col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nServiceTypeID","Service Type ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
            myManager = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(repositoryItemLookUpEdit1,dt,col,"strDescription","nServiceTypeID","Manager");

            strSQL = "select A.*,B.strDescription as ServiceTypeName from tblService A inner join tblServiceType B on A.nServiceTypeID=B.nServiceTypeID";
            strSQL += " and (A.strServiceCode like '%" + txtSearch.Text + "%' or  A.strDescription like '%" + txtSearch.Text + "%')";
            _ds = new DataSet();
            SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
            dtService=_ds.Tables["table"];
            this.gridControlMd_Service.DataSource = dtService;
        }
Esempio n. 59
0
 private void cmbMusteriDoldur()
 {
     DevExpress.XtraEditors.Controls.LookUpColumnInfo kolon1 = new DevExpress.XtraEditors.Controls.LookUpColumnInfo();
     kolon1.Caption = "Firmalar";
     kolon1.FieldName = "Adi";
     cmbMusteri.Properties.DataSource = null;
     cmbMusteri.Properties.Columns.Clear();
     cmbMusteri.Properties.Columns.Add(kolon1);
     cmbMusteri.Properties.DataSource = new Stok.Services.Musteri().GetAllbyStatus(true);
     cmbMusteri.Properties.DisplayMember = "Adi";
     cmbMusteri.Properties.ValueMember = "Id";
 }
Esempio n. 60
0
 private void LoadEmployeeList()
 {
     _ds = new DataSet();
     strSQL = "select nEmployeeID, strEmployeeName from tblEmployee";
     SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) );
     dt = _ds.Tables["Table"];
     DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2];
     col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("nEmployeeID","Employee ID",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
     col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strEmployeeName","Name",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None);
     myLookUpEdit = new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(lkedtEmployee.Properties,dt,col,"strEmployeeName","nEmployeeID","Stock");
 }