public C1ComboBox setCboFoodsTopping(C1ComboBox c) { ComboBoxItem item = new ComboBoxItem(); DataTable dt = selectC1(); //String aaa = ""; ComboBoxItem item1 = new ComboBoxItem(); item1.Text = ""; item1.Value = "000"; c.Items.Clear(); c.Items.Add(item1); //for (int i = 0; i < dt.Rows.Count; i++) foreach (DataRow row in dt.Rows) { item = new ComboBoxItem(); item.Text = row[footp.foods_topping_name].ToString(); item.Value = row[footp.foods_topping_id].ToString(); c.Items.Add(item); } return(c); }
public void setC1CboContain(C1ComboBox c, String selected) { ComboBoxItem item = new ComboBoxItem(); //DataTable dt = selectWard(); if (lContain.Count <= 0) { getlContain(); } foreach (DocType cus1 in lContain) { item = new ComboBoxItem(); item.Value = cus1.doc_type_id; item.Text = cus1.doc_type_name; c.Items.Add(item); if (item.Value.Equals(selected)) { //c.SelectedItem = item.Value; c.SelectedText = item.Text; } } }
public C1ComboBox setCboBloodGroup(C1ComboBox c) { ComboBoxItem item = new ComboBoxItem(); DataTable dt = selectC1(); //String aaa = ""; ComboBoxItem item1 = new ComboBoxItem(); item1.Text = ""; item1.Value = "000"; c.Items.Clear(); c.Items.Add(item1); //for (int i = 0; i < dt.Rows.Count; i++) foreach (DataRow row in dt.Rows) { item = new ComboBoxItem(); item.Text = row[fbg.patient_blood_group_description].ToString(); item.Value = row[fbg.f_patient_blood_group_id].ToString(); c.Items.Add(item); } return(c); }
public C1ComboBox setCboFoodsMaterial(C1ComboBox c) { ComboBoxItem item = new ComboBoxItem(); DataTable dt = selectC1(); //String aaa = ""; ComboBoxItem item1 = new ComboBoxItem(); item1.Text = ""; item1.Value = "000"; c.Items.Clear(); c.Items.Add(item1); //for (int i = 0; i < dt.Rows.Count; i++) foreach (DataRow row in dt.Rows) { item = new ComboBoxItem(); item.Text = row[matdd.matd_id].ToString(); item.Value = row[matdd.matd_detail_id].ToString(); c.Items.Add(item); } return(c); }
private void SetUniqueHistoryCombo(C1ComboBox combo, ShellObject newSo, Dictionary <string, ShellObject> historyDic) { string newPath = ""; if (newSo.IsFileSystemObject) { newPath = newSo.ParsingName; } else { newPath = newSo.Name; } if (historyDic.ContainsKey(newPath)) { //既に登録されている場合、順序入替 for (int i = 0; i < combo.Items.Count; i++) { if (combo.Items[i].ToString() == newPath) { combo.Items.Remove(combo.Items[i]); } } combo.Items.Insert(0, newPath); } else { historyDic.Add(newPath, newSo); //先頭に追加 combo.Items.Insert(0, newPath); if (combo.Items.Count > MaxHistoryCount) { //最大数を超えれば末尾を削除 combo.Items.RemoveAt(combo.Items.Count - 1); historyDic.Remove(combo.Items[combo.Items.Count - 1].ToString()); } } }
public C1ComboBox setCboPackageSellThru(C1ComboBox c, String selected) { ComboBoxItem item = new ComboBoxItem(); //DataTable dt = selectC1(); if (lSex.Count <= 0) { getlSex(); } ComboBoxItem item1 = new ComboBoxItem(); item1.Text = ""; item1.Value = "000"; c.Items.Clear(); c.Items.Add(item1); //for (int i = 0; i < dt.Rows.Count; i++) int i = 0; foreach (OldPackageSellThru row in lSex) { item = new ComboBoxItem(); item.Value = row.STID; item.Text = row.SellThru; c.Items.Add(item); if (item.Value.Equals(selected)) { //c.SelectedItem = item.Value; c.SelectedText = item.Text; c.SelectedIndex = i + 1; } i++; } if (c.Items.Count > 1) { c.SelectedIndex = 1; } return(c); }
public void setC1CboBLTYPE1(C1ComboBox c, String selected) { if (dtBl == null) { selectAllBLTYPE(); } if (dtBl.Rows.Count <= 0) { selectAllBLTYPE(); } c.DataSource = dtBl; //foreach (DocType cus1 in lBl) //{ // item = new ComboBoxItem(); // item.Value = cus1.doc_type_id; // item.Text = cus1.doc_type_name + " [" + cus1.doc_type_code + "]"; // c.Items.Add(item); // if (item.Value.Equals(selected)) // { // //c.SelectedItem = item.Value; // c.SelectedText = item.Text; // } //} }
private void setControlComponent() { int gapLine = 10, gapX = 20; Size size = new Size(); int scrW = Screen.PrimaryScreen.Bounds.Width; lbCboYear = new Label(); lbCboYear.Text = "..."; lbCboYear.Font = fEdit; lbCboYear.Location = new System.Drawing.Point(gapX, 5); lbCboYear.AutoSize = true; lbCboYear.Name = "lbCboYear"; cboYear = new C1.Win.C1Input.C1ComboBox(); cboYear.AllowSpinLoop = false; cboYear.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; cboYear.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; cboYear.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; cboYear.DisabledForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152))))); cboYear.Font = fEdit; cboYear.GapHeight = 0; cboYear.ImagePadding = new System.Windows.Forms.Padding(0); cboYear.ItemsDisplayMember = ""; cboYear.ItemsValueMember = ""; size = ic.MeasureString(lbCboYear); cboYear.Location = new System.Drawing.Point(lbCboYear.Location.X + size.Width + 5, lbCboYear.Location.Y); cboYear.Name = "cboAllergyDesc"; cboYear.Size = new System.Drawing.Size(331, 20); cboYear.Style.DropDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); cboYear.Style.DropDownBorderColor = System.Drawing.Color.Gainsboro; cboYear.Style.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(222))); cboYear.TabIndex = 698; cboYear.Tag = null; theme1.SetTheme(this.cboYear, "(default)"); cboYear.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; }
public void setCboDgs(C1ComboBox c, String selected) { ComboBoxItem item = new ComboBoxItem(); //DataTable dt = selectAll(); int i = 0; if (lDgs.Count <= 0) { getlDgs(); } item = new ComboBoxItem(); item.Value = ""; item.Text = ""; c.Items.Add(item); foreach (QueueType cus1 in lDgs) { item = new ComboBoxItem(); item.Value = cus1.queue_type_id; item.Text = cus1.queue_type_name; c.Items.Add(item); if (item.Value.Equals(selected)) { //c.SelectedItem = item.Value; c.SelectedText = item.Text; c.SelectedIndex = i + 1; } i++; } if (c.SelectedIndex <= 0) { if (c.Items.Count >= 1) { c.SelectedIndex = 1; } } }
private void initGrfPKG() { grfPkg = new C1FlexGrid(); grfPkg.Dock = DockStyle.Fill; TextBox txt = new TextBox(); C1ComboBox combo = new C1ComboBox(); combo = xC.iniDB.dctDB.setCboGW(combo); grfPkg.Cols[colPKGId].Editor = txt; grfPkg.Cols[colPKGQty].Editor = txt; grfPkg.Cols[colPKGPkgId].Editor = combo; grfPkg.Cols[colPKGQty].Caption = "qty"; grfPkg.Cols[colPKGPkgId].Caption = "PKG"; gBPkg.Controls.Add(grfPkg); grfPkg.Rows.Count = 2; grfPkg.Cols.Count = 4; grfPkg.Cols[colPKGQty].Width = 60; grfPkg.Cols[colPKGPkgId].Width = 150; grfPkg.Cols[colPKGId].Visible = false; grfPkg.CellChanged += GrfPkg_CellChanged; }
public void setCboStockDrug(C1ComboBox c, String selected) { ComboBoxItem item = new ComboBoxItem(); DataTable dt = selectAll(); //String aaa = ""; ComboBoxItem item1 = new ComboBoxItem(); item1.Text = ""; item1.Value = ""; c.Items.Clear(); c.Items.Add(item1); //for (int i = 0; i < dt.Rows.Count; i++) int i = 0; foreach (DataRow row in dt.Rows) { item = new ComboBoxItem(); item.Text = row[ostkD.DUName].ToString(); item.Value = row[ostkD.DUID].ToString(); c.Items.Add(item); i++; } }
private void initGrfContain() { grfContain = new C1FlexGrid(); grfContain.Dock = DockStyle.Fill; TextBox txt = new TextBox(); C1ComboBox combo = new C1ComboBox(); combo = xC.iniDB.dctDB.setCboContainer(combo); grfContain.Cols[colContainId].Editor = txt; grfContain.Cols[colContainQty].Editor = txt; grfContain.Cols[colContainContainId].Editor = combo; grfContain.Cols[colContainQty].Caption = "qty"; grfContain.Cols[colContainContainId].Caption = "TYPE"; gBContain.Controls.Add(grfContain); grfContain.Rows.Count = 2; grfContain.Cols.Count = 4; grfContain.Cols[colContainQty].Width = 60; grfContain.Cols[colContainContainId].Width = 150; grfContain.Cols[colContainId].Visible = false; grfContain.CellChanged += GrfContain_CellChanged; }
private void initGrfGw() { grfGw = new C1FlexGrid(); grfGw.Dock = DockStyle.Fill; TextBox txt = new TextBox(); C1ComboBox combo = new C1ComboBox(); combo = xC.iniDB.dctDB.setCboGW(combo); grfGw.Cols[colGwId].Editor = txt; grfGw.Cols[colGwQty].Editor = txt; grfGw.Cols[colGwGwId].Editor = combo; grfGw.Cols[colGwQty].Caption = "qty"; grfGw.Cols[colGwGwId].Caption = "GW & VOLUME"; gBGw.Controls.Add(grfGw); grfGw.Rows.Count = 2; grfGw.Cols.Count = 4; grfGw.Cols[colGwQty].Width = 60; grfGw.Cols[colGwGwId].Width = 150; grfGw.Cols[colGwId].Visible = false; grfGw.CellChanged += GrfGw_CellChanged; }
private void setGrfVn(String hn) { //grfDept.Rows.Count = 7; grfVn.Clear(); DataTable dt = new DataTable(); grfVn.DataSource = null; //ConnectDB con = new ConnectDB(bc.iniC); //con.OpenConnectionEx(); dt = bc.bcDB.vsDB.selectVisitByHn3(hn); //con.CloseConnectionEx(); //grfExpn.Rows.Count = dt.Rows.Count + 1; grfVn.Rows.Count = 1; grfVn.Cols.Count = 12; C1TextBox txt = new C1TextBox(); C1ComboBox cboproce = new C1ComboBox(); //ic.ivfDB.itmDB.setCboItem(cboproce); grfVn.Cols[colVsName].Editor = txt; grfVn.Cols[colVsDate].Editor = txt; grfVn.Cols[colVsName].Width = 140; grfVn.Cols[colVsDate].Width = 120; grfVn.Cols[colVsVn].Width = 80; grfVn.Cols[colVsmeno].Width = 140; grfVn.Cols[colVsDsc].Width = 80; grfVn.Cols[coLVsAn].Width = 80; grfVn.Cols[colVsStatus].Width = 40; grfVn.Cols[colVsAnDate].Width = 120; grfVn.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfVn.Cols[colVsName].Caption = "HN"; grfVn.Cols[colVsDate].Caption = "Visit Date"; grfVn.Cols[colVsVn].Caption = "VN"; grfVn.Cols[colVsmeno].Caption = "อาการ"; grfVn.Cols[colVsDsc].Caption = "desc"; grfVn.Cols[coLVsAn].Caption = "AN"; grfVn.Cols[colVsStatus].Caption = " "; grfVn.Cols[colVsAnDate].Caption = "AN Date"; Color color = ColorTranslator.FromHtml(bc.iniC.grfRowColor); //CellRange rg1 = grfBank.GetCellRange(1, colE, grfBank.Rows.Count, colE); //rg1.Style = grfBank.Styles["date"]; //grfCu.Cols[colID].Visible = false; for (int i = 0; i <= dt.Rows.Count - 1; i++) { Row row = grfVn.Rows.Add(); row[0] = i; row[colVsVn] = dt.Rows[i]["MNC_VN_NO"].ToString() + "/" + dt.Rows[i]["MNC_VN_SEQ"].ToString() + "(" + dt.Rows[i]["MNC_VN_SUM"].ToString() + ")"; row[colVsName] = dt.Rows[i]["prefix"].ToString() + " " + dt.Rows[i]["MNC_FNAME_T"].ToString() + " " + dt.Rows[i]["MNC_LNAME_T"].ToString(); row[colVsDate] = bc.datetoShow(dt.Rows[i]["mnc_date"].ToString()); row[colVsPreNo] = dt.Rows[i]["mnc_pre_no"].ToString(); row[colVsmeno] = dt.Rows[i]["mnc_shif_memo"].ToString(); row[colVsDsc] = dt.Rows[i]["mnc_ref_dsc"].ToString(); row[coLVsAn] = dt.Rows[i]["mnc_an_no"].ToString() + "/" + dt.Rows[i]["mnc_an_yr"].ToString(); row[colVsStatus] = dt.Rows[i]["MNC_PAT_FLAG"].ToString(); row[colVsAnDate] = bc.datetoShow(dt.Rows[i]["mnc_ad_date"].ToString()); row[colVsHn] = dt.Rows[i]["mnc_hn_no"].ToString(); row[colDOB] = dt.Rows[i]["MNC_bday"].ToString(); } grfVn.Cols[colVsVn].AllowEditing = false; grfVn.Cols[colCuName].AllowEditing = false; grfVn.Cols[colVsPreNo].Visible = false; grfVn.Cols[colVsName].Visible = false; grfVn.Cols[colVsHn].Visible = false; grfVn.Cols[colDOB].Visible = false; }
private void setGrfStockRec(String id) { //grfDept.Rows.Count = 7; grfStk.Cols.Count = 12; grfStk.Rows.Count = 2; grfStk.Cols[colCode].Width = 120; grfStk.Cols[colPrice].Width = 80; grfStk.Cols[colName].Width = 300; grfStk.Cols[colQty].Width = 80; grfStk.Cols[colUnit].Width = 100; grfStk.Cols[colLotNo].Width = 100; grfStk.Cols[colExpDate].Width = 120; grfStk.Cols[colAmt].Width = 100; grfStk.Cols[colId].Width = 120; grfStk.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; CellStyle cs = grfStk.Styles.Add("date"); cs.DataType = typeof(DateTime); CellStyle cs1 = grfStk.Styles.Add("int"); cs1.DataType = typeof(int); CellStyle cs2 = grfStk.Styles.Add("decimal"); cs2.DataType = typeof(decimal); grfStk.Cols[colExpDate].Style = cs; grfStk.Cols[colQty].Style = cs1; grfStk.Cols[colCode].Caption = "รหัส"; grfStk.Cols[colName].Caption = "ชื่อ"; grfStk.Cols[colPrice].Caption = "ราคา"; grfStk.Cols[colQty].Caption = "QTY"; grfStk.Cols[colUnit].Caption = "หน่วย"; grfStk.Cols[colLotNo].Caption = "LotNo"; grfStk.Cols[colExpDate].Caption = "Expire Date"; grfStk.Cols[colAmt].Caption = "รวมราคา"; grfStk.Cols[colRemark].Caption = "หมายเหตุ"; C1ComboBox cbo = new C1ComboBox(); cbo = ic.ivfDB.oStkdDB.setCboStockDrug(); cbo.DropDownClosed += Cbo_DropDownClosed; //cs.DataType = typeof(ComboBox); grfStk.Cols[colName].Editor = cbo; //grfStk.Cols[colName].Style = cs; //for (int col = 0; col < dt.Columns.Count; ++col) //{ // grfDrug.Cols[col + 1].DataType = dt.Columns[col].DataType; // grfDrug.Cols[col + 1].Caption = dt.Columns[col].ColumnName; // grfDrug.Cols[col + 1].Name = dt.Columns[col].ColumnName; //} grfStk.Cols[colId].Visible = false; grfStk.Cols[colPrice].Visible = false; grfStk.Cols[colEdit].Visible = false; grfStk.Cols[colAmt].Visible = false; grfStk.Cols[colUnit].AllowEditing = false; //grfStk.Cols[colQty].Visible = false; grfStk.SelectionMode = SelectionModeEnum.Cell; if (id.Length <= 0) { return; } DataTable dt = new DataTable(); dt = ic.ivfDB.stkrdDB.selectByRecId(id); grfStk.Rows.Count = dt.Rows.Count + 1; for (int i = 1; i <= dt.Rows.Count; i++) { Decimal price = 0; Decimal.TryParse(dt.Rows[i - 1][ic.ivfDB.stkrdDB.stkrd.price].ToString(), out price); grfStk.Rows[i][colId] = dt.Rows[i - 1][ic.ivfDB.stkrdDB.stkrd.rec_detail_id].ToString(); grfStk.Rows[i][colCode] = dt.Rows[i - 1][ic.ivfDB.stkrdDB.stkrd.goods_id].ToString(); grfStk.Rows[i][colUnit] = dt.Rows[i - 1][ic.ivfDB.stkrdDB.stkrd.unit_name].ToString(); grfStk.Rows[i][colName] = ic.ivfDB.oStkdDB.getDrugName(dt.Rows[i - 1][ic.ivfDB.stkrdDB.stkrd.goods_id].ToString()); grfStk.Rows[i][colPrice] = price.ToString("#,###.00"); grfStk.Rows[i][colQty] = dt.Rows[i - 1][ic.ivfDB.stkrdDB.stkrd.qty].ToString(); grfStk.Rows[i][colRemark] = dt.Rows[i - 1][ic.ivfDB.stkrdDB.stkrd.remark].ToString(); grfStk[i, 0] = i; if (i % 2 == 0) { grfStk.Rows[i].StyleNew.BackColor = ColorTranslator.FromHtml(ic.iniC.grfRowColor); } } //grfAgn.Cols[colS].Visible = false; //grfAgn.Cols[colRemark].Visible = false; }
private void initTab() { int gapLine = 15, gapX = 20; Size size = new Size(); Size size1 = new Size(); int scrW = Screen.PrimaryScreen.Bounds.Width; tC1 = new C1.Win.C1Command.C1DockingTab(); tC1.Dock = System.Windows.Forms.DockStyle.Fill; tC1.HotTrack = true; tC1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; tC1.TabSizeMode = C1.Win.C1Command.TabSizeModeEnum.Fit; tC1.TabsShowFocusCues = true; tabItem = new C1.Win.C1Command.C1DockingTabPage(); tabItem.Name = "tabItem"; tabItem.TabIndex = 0; tabItem.Text = "Item Master"; tabDrug = new C1.Win.C1Command.C1DockingTabPage(); tabDrug.Name = "tabDrug"; tabDrug.TabIndex = 0; tabDrug.Text = "Drug"; tabSpecial = new C1.Win.C1Command.C1DockingTabPage(); tabSpecial.Name = "tabSpecial"; tabSpecial.TabIndex = 0; tabSpecial.Text = "Special Item"; tabLab = new C1.Win.C1Command.C1DockingTabPage(); tabLab.Name = "tabLab"; tabLab.TabIndex = 0; tabLab.Text = "Lab Item"; pnItem = new Panel(); pnItem.Dock = DockStyle.Fill; lbCboname = new Label(); lbCboname.Text = "Type :"; lbCboname.Font = fEdit; lbCboname.Location = new System.Drawing.Point(gapX, 10); lbCboname.AutoSize = true; cboItemType = new C1ComboBox(); size = ic.MeasureString(lbCboname); cboItemType.Location = new System.Drawing.Point(gapX + size.Width, lbCboname.Location.Y); cboItemType.SelectedItemChanged += CboItemType_SelectedItemChanged; lbItem = new Label(); lbItem.Text = "Item :"; lbItem.Font = fEdit; lbItem.Location = new System.Drawing.Point(gapX, gapLine + cboItemType.Height); lbItem.AutoSize = true; txtCode = new C1TextBox(); txtCode.Font = fEdit; txtCode.Location = new System.Drawing.Point(cboItemType.Location.X, lbItem.Location.Y); lbItemName = new Label(); lbItemName.Text = "..."; lbItemName.Font = fEdit; lbItemName.Location = new System.Drawing.Point(txtCode.Location.X + txtCode.Width, txtCode.Location.Y); lbItemName.AutoSize = true; btnSave = new C1Button(); btnSave.Name = ""; btnSave.Text = "Save"; btnSave.Font = fEdit; btnSave.Location = new System.Drawing.Point(txtCode.Location.X + txtCode.Width + 300, txtCode.Location.Y); btnSave.Click += BtnSave_Click; btnClear = new C1Button(); btnClear.Name = ""; btnClear.Text = "Clear"; btnClear.Font = fEdit; btnClear.Location = new System.Drawing.Point(btnSave.Location.X + btnSave.Width + 10, btnSave.Location.Y); btnClear.Click += BtnClear_Click; lbMessage = new Label(); lbMessage.Text = ""; lbMessage.Font = fEditB; lbMessage.Location = new System.Drawing.Point(btnClear.Location.X + btnClear.Width + 10, btnClear.Location.Y); lbMessage.AutoSize = true; panel1.Controls.Add(tC1); tC1.Controls.Add(tabItem); tC1.Controls.Add(tabDrug); tC1.Controls.Add(tabSpecial); tC1.Controls.Add(tabLab); grfItem = new C1FlexGrid(); grfItem.Font = fEdit; grfItem.Location = new System.Drawing.Point(gapX, gapLine + txtCode.Height + txtCode.Location.Y); grfItem.Size = new Size(900, 300); grfItem.RowColChange += GrfItem_RowColChange; lbCapPtt = new Label(); lbCapPtt.Text = "Master"; lbCapPtt.Font = fEdit; lbCapPtt.Location = new System.Drawing.Point(gapX, gapLine + grfItem.Location.Y + grfItem.Height); lbCapPtt.AutoSize = true; size = ic.MeasureString(lbCapPtt); txtItemCode = new C1TextBox(); txtItemCode.Font = fEdit; txtItemCode.Location = new System.Drawing.Point(gapX + size.Width, lbCapPtt.Location.Y); lbItemCode = new Label(); lbItemCode.Text = "..."; lbItemCode.Font = fEdit; lbItemCode.Location = new System.Drawing.Point(gapX + txtItemCode.Location.X + txtItemCode.Width, lbCapPtt.Location.Y); lbItemCode.AutoSize = true; lbCapLink = new Label(); lbCapLink.Text = "Link"; lbCapLink.Font = fEdit; lbCapLink.Location = new System.Drawing.Point(scrW / 2, lbCapPtt.Location.Y); lbCapLink.AutoSize = true; size = ic.MeasureString(lbCapLink); txtLinkCode = new C1TextBox(); txtLinkCode.Font = fEdit; txtLinkCode.Location = new System.Drawing.Point(lbCapLink.Location.X + size.Width, lbCapLink.Location.Y); lbLinkCode = new Label(); lbLinkCode.Text = "..."; lbLinkCode.Font = fEdit; lbLinkCode.Location = new System.Drawing.Point(gapX + txtLinkCode.Location.X + txtLinkCode.Width, lbCapPtt.Location.Y); lbLinkCode.AutoSize = true; grfPtt = new C1FlexGrid(); grfPtt.Font = fEdit; grfPtt.Location = new System.Drawing.Point(gapX, lbCapPtt.Height + lbCapPtt.Location.Y); grfPtt.Size = new Size((scrW / 2) - 50, 300); grfPtt.RowColChange += GrfPtt_RowColChange; grfLink = new C1FlexGrid(); grfLink.Font = fEdit; grfLink.Location = new System.Drawing.Point(gapX + grfPtt.Width + gapX, grfPtt.Location.Y); grfLink.Size = new Size((scrW / 2) - 50, 300); grfLink.RowColChange += GrfLink_RowColChange; tabItem.Controls.Add(pnItem); pnItem.Controls.Add(lbCboname); pnItem.Controls.Add(cboItemType); pnItem.Controls.Add(lbItemName); pnItem.Controls.Add(lbItem); pnItem.Controls.Add(txtCode); pnItem.Controls.Add(grfItem); pnItem.Controls.Add(lbCapPtt); pnItem.Controls.Add(lbCapLink); pnItem.Controls.Add(grfPtt); pnItem.Controls.Add(grfLink); pnItem.Controls.Add(txtItemCode); pnItem.Controls.Add(txtLinkCode); pnItem.Controls.Add(lbItemCode); pnItem.Controls.Add(lbLinkCode); pnItem.Controls.Add(btnSave); pnItem.Controls.Add(btnClear); pnItem.Controls.Add(lbMessage); theme1.SetTheme(panel1, ic.iniC.themeApp); theme1.SetTheme(tC1, ic.iniC.themeApp); theme1.SetTheme(tC1, ic.iniC.themeApp); theme1.SetTheme(lbMessage, ic.iniC.themeApp); lbMessage.Text = "สร้างข้อมูลLinkใหม่"; }
private void setGrfDeptH() { grfExpnD.Clear(); //if (txtID.Text.Equals("")) return; DataTable dt = new DataTable(); //if (flagfom2 ==flagForm2.Cash) //{ // dt = xC.xtDB.expnddDB.selectCashByDrawId1(txtID.Text); // if (dt.Rows.Count <= 1) grfExpnD.Rows.Count = dt.Rows.Count + 2; // else grfExpnD.Rows.Count = dt.Rows.Count + 1; // grfExpnD.Cols.Count = dt.Columns.Count+1; //} //else //{ dt = xC.accDB.expnddDB.selectChequeByDrawId1(txtID.Text); if (dt.Rows.Count <= 1) { grfExpnD.Rows.Count = dt.Rows.Count + 2; } else { grfExpnD.Rows.Count = dt.Rows.Count + 1; } grfExpnD.Cols.Count = dt.Columns.Count + 2; //} //grfExpnD.Rows.Count = 2; CellStyle cs = grfExpnD.Styles.Add("date"); cs.DataType = typeof(DateTime); cs.Format = "dd-MM-yyyy"; //cs.ForeColor = Color.DarkGoldenrod; C1TextBox txt = new C1TextBox(); txt.DataType = txtCode.DataType; C1TextBox txt1 = new C1TextBox(); txt1.DataType = txtAmt.DataType; C1ComboBox cbo = new C1ComboBox(); ComboBox cbo1 = new ComboBox(); xC.iniDB.itmDB.setC1CboItem(cbo); xC.iniDB.itmDB.setCboItem(cbo1); C1ComboBox cbou = new C1ComboBox(); C1TextBox txt2 = new C1TextBox(); txt2.DataType = txtExpndDrawDate.DataType; xC.iniDB.utpDB.setC1CboUtp(cbou, ""); grfExpnD.Cols[colDItemNamet].Editor = cbo1; grfExpnD.Cols[colDQty].Editor = txt1; grfExpnD.Cols[colDUnitNameT].Editor = cbou; grfExpnD.Cols[colDamt].Editor = txt1; grfExpnD.Cols[colDPrice].Editor = txt1; grfExpnD.Cols[colDwatx1].Editor = txt1; grfExpnD.Cols[colDwatx3].Editor = txt1; grfExpnD.Cols[colDvat].Editor = txt1; grfExpnD.Cols[colDtotal].Editor = txt1; grfExpnD.Cols[colDremark].Editor = txt; grfExpnD.Cols[colDItemId].Editor = txt; grfExpnD.Cols[colDUnitId].Editor = txt; //if(flagfom2 == flagForm2.Cheque) //{ grfExpnD.Cols[colDpaytocusnamet].Editor = txt; grfExpnD.Cols[colDpaytocusaddr].Editor = txt; grfExpnD.Cols[colDapaytocustax].Editor = txt; grfExpnD.Cols[colDreceiptno].Editor = txt; grfExpnD.Cols[colDreceiptdate].Style = cs; grfExpnD.Cols[colDpaytocusid].Editor = txt; //} grfExpnD.Cols[colDQty].Width = 80; grfExpnD.Cols[colDUnitNameT].Width = 140; grfExpnD.Cols[colDamt].Width = 100; grfExpnD.Cols[colDPrice].Width = 80; grfExpnD.Cols[colDItemNamet].Width = 220; grfExpnD.Cols[colDwatx1].Width = 80; grfExpnD.Cols[colDwatx3].Width = 80; grfExpnD.Cols[colDvat].Width = 80; grfExpnD.Cols[colDtotal].Width = 100; grfExpnD.Cols[colDremark].Width = 200; //if (flagfom2 == flagForm2.Cheque) //{ grfExpnD.Cols[colDpaytocusnamet].Width = 200; grfExpnD.Cols[colDpaytocusaddr].Width = 200; grfExpnD.Cols[colDapaytocustax].Width = 80; grfExpnD.Cols[colDreceiptno].Width = 100; grfExpnD.Cols[colDreceiptdate].Width = 100; //} grfExpnD.ShowCursor = true; grfExpnD.Cols[colDItemNamet].Caption = "รายการ"; grfExpnD.Cols[colDQty].Caption = "QTY"; grfExpnD.Cols[colDUnitNameT].Caption = "หน่วย"; grfExpnD.Cols[colDPrice].Caption = "ราคา"; grfExpnD.Cols[colDamt].Caption = "รวมราคา"; grfExpnD.Cols[colDwatx1].Caption = "WTAX 1%"; grfExpnD.Cols[colDwatx3].Caption = "WTAX 3%"; grfExpnD.Cols[colDvat].Caption = "VAT"; grfExpnD.Cols[colDtotal].Caption = "รวมทั้งหมด"; grfExpnD.Cols[colDremark].Caption = "หมายเหตุ"; //if (flagfom2 == flagForm2.Cheque) //{ grfExpnD.Cols[colDpaytocusnamet].Caption = "ชื่อลูกค้า"; grfExpnD.Cols[colDpaytocusaddr].Caption = "ที่อยู่ลูกค้า"; grfExpnD.Cols[colDapaytocustax].Caption = "tax id"; grfExpnD.Cols[colDreceiptno].Caption = "เลขที่ใบเสร็จ"; grfExpnD.Cols[colDreceiptdate].Caption = "วันที่ในใบเสร็จ"; //} Color color = ColorTranslator.FromHtml(xC.iniC.grfRowColor); for (int i = 0; i < dt.Rows.Count; i++) { grfExpnD[i + 1, 0] = i + 1; if (i % 2 == 0) { grfExpnD.Rows[i + 1].StyleNew.BackColor = color; } grfExpnD[i + 1, colDid] = dt.Rows[i][xC.accDB.expnddDB.expnC.expenses_draw_detail_id].ToString(); grfExpnD[i + 1, colDItemNamet] = dt.Rows[i][xC.accDB.expnddDB.expnC.item_name_t].ToString(); grfExpnD[i + 1, colDQty] = dt.Rows[i][xC.accDB.expnddDB.expnC.qty].ToString(); grfExpnD[i + 1, colDUnitNameT] = dt.Rows[i][xC.accDB.expnddDB.expnC.unit_name_t].ToString(); grfExpnD[i + 1, colDamt] = dt.Rows[i][xC.accDB.expnddDB.expnC.amount].ToString(); grfExpnD[i + 1, colDPrice] = dt.Rows[i][xC.accDB.expnddDB.expnC.price].ToString(); grfExpnD[i + 1, colDwatx1] = dt.Rows[i][xC.accDB.expnddDB.expnC.wtax1].ToString(); grfExpnD[i + 1, colDwatx3] = dt.Rows[i][xC.accDB.expnddDB.expnC.wtax3].ToString(); grfExpnD[i + 1, colDvat] = dt.Rows[i][xC.accDB.expnddDB.expnC.vat].ToString(); grfExpnD[i + 1, colDtotal] = dt.Rows[i][xC.accDB.expnddDB.expnC.total].ToString(); grfExpnD[i + 1, colDremark] = dt.Rows[i][xC.accDB.expnddDB.expnC.remark].ToString(); grfExpnD[i + 1, colDItemId] = dt.Rows[i][xC.accDB.expnddDB.expnC.item_id].ToString(); //if (flagfom2 == flagForm2.Cheque) //{ grfExpnD[i + 1, colDpaytocusnamet] = dt.Rows[i][xC.accDB.expnddDB.expnC.pay_to_cus_name_t].ToString(); grfExpnD[i + 1, colDpaytocusaddr] = dt.Rows[i][xC.accDB.expnddDB.expnC.pay_to_cus_addr].ToString(); grfExpnD[i + 1, colDapaytocustax] = dt.Rows[i][xC.accDB.expnddDB.expnC.pay_to_cus_tax].ToString(); grfExpnD[i + 1, colDreceiptno] = dt.Rows[i][xC.accDB.expnddDB.expnC.receipt_no].ToString(); grfExpnD[i + 1, colDreceiptdate] = dt.Rows[i][xC.accDB.expnddDB.expnC.receipt_date].ToString(); grfExpnD[i + 1, colDpaytocusid] = dt.Rows[i][xC.accDB.expnddDB.expnC.pay_to_cus_id].ToString(); grfExpnD[i + 1, colDedit] = "-"; //} } //CellRange rg1 = grfBank.GetCellRange(1, colE, grfBank.Rows.Count, colE); //rg1.Style = grfBank.Styles["date"]; //if (grfPic.Rows.Count == (grfPic.Row + 1)) grfPic.Rows.Count++; //grfExpnD.AfterRowColChange += GrfExpnD_AfterRowColChange; if (flagForm.Equals("pay")) { ContextMenu menuGw = new ContextMenu(); menuGw.MenuItems.Add("&จ่ายเงิน รายการเบิก", new EventHandler(ContextMenu_pay)); //menuGw.MenuItems.Add("&แก้ไข", new EventHandler(ContextMenu_Gw_Edit)); //menuGw.MenuItems.Add("&ยกเลิก", new EventHandler(ContextMenu_Gw_Cancel)); grfExpnD.ContextMenu = menuGw; } grfExpnD.Cols[colDid].Visible = false; grfExpnD.Cols[colDItemId].Visible = false; grfExpnD.Cols[colDUnitId].Visible = false; grfExpnD.Cols[colDedit].Visible = false; if (flagfom2 == flagForm2.Cheque) { grfExpnD.Cols[colDpaytocusid].Visible = false; } }
private void initCompomentTabWithDraw() { int gapLine = 25, gapX = 20, gapY = 20, xCol2 = 150, xCol20 = 130, xCol1 = 80, xCol3 = 330, xCol31 = 460, xcol32 = 540, xCol4 = 640, xcol41 = 660, xCol5 = 950; Size size = new Size(); tabWithDraw = new C1DockingTabPage(); tabWithDraw.Location = new System.Drawing.Point(1, 24); //tabScan.Name = "c1DockingTabPage1"; tabWithDraw.Size = new System.Drawing.Size(667, 175); tabWithDraw.TabIndex = 0; tabWithDraw.Text = "WithDraw"; tabWithDraw.Name = "tabWithDraw"; tcMain.Controls.Add(tabWithDraw); lbtxtWithDrawCode = new Label(); lbtxtWithDrawAmount = new Label(); lbtxtWithDrawRemark = new Label(); lbtxtWithDrawDate = new Label(); lbtxtWithDrawHn = new Label(); lbtxtWithDrawAmount = new Label(); lbtxtWithDrawName = new Label(); lbtxtWithDrawAmt = new Label(); lbtxtWithDrawDeposit = new Label(); txtWithDrawCode = new C1TextBox(); txtWithDrawAmount = new C1TextBox(); txtWithDrawDate = new C1DateEdit(); txtWithDrawHn = new C1TextBox(); txtWithDrawId = new C1TextBox(); txtWithDrawVisitId = new C1TextBox(); txtWithDrawRemark = new C1TextBox(); txtWithDrawVisitId = new C1TextBox(); txtWithDrawName = new C1TextBox(); txtWithDrawVn = new C1TextBox(); txtWithDrawVisitId = new C1TextBox(); txtWithDrawPttId = new C1TextBox(); txtWithDrawAmt = new C1TextBox(); txtWithDrawDeposit = new C1TextBox(); btnWithDrawSearch = new C1Button(); btnWithDrawSave = new C1Button(); chkWithDrawActive = new RadioButton(); chkWithDrawUnActive = new RadioButton(); lbcboPackageHn = new Label(); cboPackageHn = new C1ComboBox(); ic.setControlLabel(ref lbtxtWithDrawCode, fEdit, "code :", "lbtxtWithDrawCode", gapX, gapY); ic.setControlC1TextBox(ref txtWithDrawCode, fEdit, "txtWithDrawCode", 120, xCol20, gapY); ic.setControlLabel(ref lbtxtWithDrawDate, fEdit, "Date Withdraw :", "lbtxtWithDrawDate", xcol32, gapY); size = ic.MeasureString(lbtxtWithDrawDate); ic.setControlC1DateTimeEdit(ref txtWithDrawDate, "txtWithDrawDate", lbtxtWithDrawDate.Location.X + size.Width + 15, gapY); ic.setControlC1Button(ref btnWithDrawSave, fEdit, "Save", "btnWithDrawSave", txtWithDrawCode.Location.X + txtWithDrawCode.Width + 20, gapY - 10); btnWithDrawSave.Width = 70; ic.setControlRadioBox(ref chkWithDrawActive, fEdit, "Active", "chkActive", btnWithDrawSave.Location.X + btnWithDrawSave.Width + 20, gapY); ic.setControlRadioBox(ref chkWithDrawUnActive, fEdit, "UnActive", "chkUnActive", chkWithDrawActive.Location.X + 80, gapY); gapY += gapLine; ic.setControlLabel(ref lbtxtWithDrawHn, fEdit, "HN :", "lbtxtWithDrawHn", gapX, gapY); ic.setControlC1TextBox(ref txtWithDrawHn, fEdit, "txtWithDrawHn", 120, xCol20, gapY); ic.setControlC1TextBox(ref txtWithDrawVn, fEdit, "txtWithDrawVn", 120, txtWithDrawHn.Location.X + txtWithDrawHn.Width + 20, gapY); ic.setControlC1Button(ref btnWithDrawSearch, fEdit, "...", "btnWithDrawSearch", txtWithDrawVn.Location.X + txtWithDrawVn.Width + 10, gapY - 4); btnWithDrawSearch.Width = 30; btnWithDrawSearch.Height = 25; ic.setControlLabel(ref lbtxtWithDrawDeposit, fEdit, "Deposit :", "lbtxtWithDrawDeposit", xcol32, gapY); ic.setControlC1TextBox(ref txtWithDrawDeposit, fEdit, "txtWithDrawDeposit", 120, xCol4, gapY); gapY += gapLine; ic.setControlLabel(ref lbtxtWithDrawName, fEdit, "Name :", "lbtxtWithDrawName", gapX, gapY); ic.setControlC1TextBox(ref txtWithDrawName, fEdit, "txtWithDrawName", 400, xCol20, gapY); //gapY += gapLine; ic.setControlLabel(ref lbtxtWithDrawAmt, fEdit, "Amount :", "lbtxtWithDrawAmt", xcol32, gapY); ic.setControlC1TextBox(ref txtWithDrawAmt, fEdit, "txtWithDrawAmt", 120, xCol4, gapY); //ic.setControlRadioBox(ref chkWithDrawActive, fEdit, "Active", "chkActive", xCol4, gapY); //ic.setControlRadioBox(ref chkWithDrawUnActive, fEdit, "UnActive", "chkUnActive", chkActive.Location.X + 80, gapY); gapY += gapLine; ic.setControlLabel(ref lbtxtWithDrawRemark, fEdit, "Remark :", "lbtxtWithDrawRemark", gapX, gapY); ic.setControlC1TextBox(ref txtWithDrawRemark, fEdit, "txtWithDrawRemark", 400, xCol20, gapY); //gapY += gapLine; ic.setControlLabel(ref lbtxtWithDrawAmount, fEdit, "WithDraw :", "lbtxtWithDrawAmount", xcol32, gapY); size = ic.MeasureString(lbtxtWithDrawAmount); ic.setControlC1TextBox(ref txtWithDrawAmount, fEdit, "txtWithDrawAmount", 120, xCol4, gapY); txtWithDrawAmount.NumericInput = true; txtWithDrawAmount.DataType = typeof(decimal); gapY += gapLine; ic.setControlLabel(ref lbcboPackageHn, fEdit, "Package :", "lbcboPackageHn", gapX, gapY); ic.setControlC1ComboBox(ref cboPackageHn, fEdit, "cboPackageHn", 500, xCol2, gapY); grfWithDraw = new C1FlexGrid(); grfWithDraw.Name = "grfWithDraw"; grfWithDraw.Font = fEdit; grfWithDraw.Dock = System.Windows.Forms.DockStyle.Bottom; grfWithDraw.Location = new System.Drawing.Point(0, 0); grfWithDraw.Rows.Count = 1; grfDepositHn = new C1FlexGrid(); grfDepositHn.Name = "grfDepositHn"; grfDepositHn.Font = fEdit; grfDepositHn.Dock = System.Windows.Forms.DockStyle.None; grfDepositHn.Location = new System.Drawing.Point(0, 0); grfDepositHn.Rows.Count = 1; tabWithDraw.Controls.Add(grfWithDraw); tabWithDraw.Controls.Add(btnWithDrawSave); tabWithDraw.Controls.Add(txtWithDrawRemark); tabWithDraw.Controls.Add(lbtxtWithDrawRemark); tabWithDraw.Controls.Add(txtWithDrawName); tabWithDraw.Controls.Add(lbtxtWithDrawName); tabWithDraw.Controls.Add(txtWithDrawAmount); tabWithDraw.Controls.Add(lbtxtWithDrawAmount); tabWithDraw.Controls.Add(btnWithDrawSearch); tabWithDraw.Controls.Add(txtWithDrawVn); tabWithDraw.Controls.Add(txtWithDrawHn); tabWithDraw.Controls.Add(lbtxtWithDrawHn); tabWithDraw.Controls.Add(txtWithDrawDate); tabWithDraw.Controls.Add(lbtxtWithDrawDate); tabWithDraw.Controls.Add(txtWithDrawCode); tabWithDraw.Controls.Add(lbtxtWithDrawCode); tabWithDraw.Controls.Add(chkWithDrawActive); tabWithDraw.Controls.Add(chkWithDrawUnActive); tabWithDraw.Controls.Add(grfDepositHn); tabWithDraw.Controls.Add(lbtxtWithDrawAmt); tabWithDraw.Controls.Add(txtWithDrawAmt); tabWithDraw.Controls.Add(lbtxtWithDrawDeposit); tabWithDraw.Controls.Add(txtWithDrawDeposit); tabWithDraw.Controls.Add(cboPackageHn); tabWithDraw.Controls.Add(lbcboPackageHn); //theme1.SetTheme(cboPackageHn, ic.iniC.themeApp); }
private void setGrfTax(String expnpdid) { Company cop = new Company(); cop = xC.xtDB.copDB.selectByCode1("001"); DataTable dt = new DataTable(); dt = xC.accDB.expnpdDB.selectPrintCheque(expnpdid); grfTax.Clear(); grfTax.Cols.Count = 10; if (dt.Rows.Count > 0) { grfTax.Rows.Count = dt.Rows.Count + 1; } else { grfTax.Rows.Count = 2; } //grfChequeBnk.Cols.Count = 7; CellStyle cs = grfTax.Styles.Add("date"); cs.DataType = typeof(DateTime); cs.Format = "dd-MM-yyyy"; C1TextBox txt = new C1TextBox(); txt.DataType = txtCusTaxNameT.DataType; C1TextBox txt1 = new C1TextBox(); txt1.DataType = txtAmt.DataType; C1ComboBox cbo = new C1ComboBox(); xC.iniDB.itmDB.setC1CboItem(cbo); C1TextBox txt2 = new C1TextBox(); txt2.DataType = txtTaxDate.DataType; grfTax.Cols[colTItemNameT].Editor = cbo; grfTax.Cols[colTtaxdate].Style = cs; grfTax.Cols[colTAmt].Editor = txt1; grfTax.Cols[colTtaxamt].Editor = txt1; grfTax.Cols[colTItemNameT].Width = 240; grfTax.Cols[colTtaxdate].Width = 100; grfTax.Cols[colTAmt].Width = 100; grfTax.Cols[colTtaxamt].Width = 100; grfTax.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfTax.Cols[colTItemNameT].Caption = "รายการ"; grfTax.Cols[colTtaxdate].Caption = "วันที่จ่ายเงิน"; grfTax.Cols[colTAmt].Caption = "ยอดเงินที่จ่าย"; grfTax.Cols[colTtaxamt].Caption = "ภาษีหัก ณ ที่จ่าย"; for (int i = 0; i < dt.Rows.Count; i++) { grfTax[i + 1, colTItemNameT] = dt.Rows[i][xC.accDB.expnpdDB.expnP.pay_to_cus_name_t].ToString(); grfTax[i + 1, colTtaxdate] = dt.Rows[i][xC.accDB.expnpdDB.expnP.pay_bank_date].ToString(); grfTax[i + 1, colTAmt] = dt.Rows[i][xC.iniDB.copbDB.copB.comp_bank_name_t].ToString(); grfTax[i + 1, colTtaxamt] = dt.Rows[i][xC.iniDB.copbDB.copB.comp_bank_branch].ToString(); grfTax[i + 1, colTID] = dt.Rows[i][xC.iniDB.copbDB.copB.acc_number].ToString(); grfTax[i + 1, colTitemid] = dt.Rows[i][xC.accDB.expnpdDB.expnP.pay_amount].ToString(); grfTax[i + 1, colTbtaxid] = dt.Rows[i][xC.accDB.expnpdDB.expnP.pay_amount].ToString(); } Color color = ColorTranslator.FromHtml(xC.iniC.grfRowColor); for (int i = 1; i < grfTax.Rows.Count; i++) { grfTax[i, 0] = i; if (i % 2 == 0) { grfTax.Rows[i].StyleNew.BackColor = color; } } //CellRange rg1 = grfBank.GetCellRange(1, colE, grfBank.Rows.Count, colE); //rg1.Style = grfBank.Styles["date"]; grfTax.Cols[colTID].Visible = false; grfTax.Cols[colTitemid].Visible = false; grfTax.Cols[colTbtaxid].Visible = false; grfTax.Cols[colTftaxid].Visible = false; }
private void initCompoment() { int gapLine = 25, gapX = 20, gapY = 20, xCol2 = 150, xCol1 = 80, xCol3 = 330, xCol4 = 640, xCol5 = 950; Size size = new Size(); tcMain = new C1DockingTab(); tcMain.Dock = System.Windows.Forms.DockStyle.Fill; tcMain.Location = new System.Drawing.Point(0, 266); tcMain.Name = "tcMain"; //tcMain.Size = new System.Drawing.Size(669, 200); tcMain.TabIndex = 0; tcMain.TabsSpacing = 5; tcMain.ShowCaption = false; tabDeposit = new C1DockingTabPage(); tabDeposit.Location = new System.Drawing.Point(1, 24); //tabScan.Name = "c1DockingTabPage1"; tabDeposit.Size = new System.Drawing.Size(667, 175); tabDeposit.TabIndex = 0; tabDeposit.Text = "Template Drug"; tabDeposit.Name = "tabDeposit"; tcMain.Controls.Add(tabDeposit); lbcboDrugName = new Label(); lbtxtRemark = new Label(); lbtxtQty = new Label(); lbtxtThai = new Label(); lbtxtEng = new Label(); lbtxtDtrName = new Label(); txtRemark = new C1TextBox(); txtQty = new C1TextBox(); txtThai = new C1TextBox(); txtEng = new C1TextBox(); txtDtrName = new C1TextBox(); cboDrugName = new C1ComboBox(); lbcboTempDrugName = new Label(); txtTempDrugName = new C1TextBox(); txtId = new C1TextBox(); cboTempDrugName = new C1ComboBox(); btnNew = new C1Button(); btnSave = new C1Button(); ic.setControlLabel(ref lbcboTempDrugName, fEdit, "Template Name :", "lbtxtTempDrugName", gapX, gapY); //ic.setControlC1TextBox(ref txtTempDrugName, fEdit, "txtTempDrugName", 400, xCol2, gapY); ic.setControlC1ComboBox(ref cboTempDrugName, fEdit, "cboTempDrugName", 400, xCol2, gapY); gapY += gapLine; ic.setControlLabel(ref lbtxtDtrName, fEdit, "Doctor Name :", "lbtxtDtrName", gapX, gapY); ic.setControlC1TextBox(ref txtDtrName, fEdit, "txtDtrName", 400, xCol2, gapY); gapY += gapLine; ic.setControlLabel(ref lbcboDrugName, fEdit, "Drug Name :", "lbcboDrugName", gapX, gapY); ic.setControlC1ComboBox(ref cboDrugName, "cboDrugName", 400, xCol2, gapY); cboDrugName.Font = fEdit; gapY += gapLine; ic.setControlLabel(ref lbtxtRemark, fEdit, "Remark :", "lbtxtRemark", gapX, gapY); ic.setControlC1TextBox(ref txtRemark, fEdit, "txtRemark", 400, xCol2, gapY); ic.setControlC1Button(ref btnNew, fEdit, "New", "btnNew", xCol4, gapY - 10); btnNew.Width = 70; gapY += gapLine; ic.setControlLabel(ref lbtxtThai, fEdit, "Thai :", "lbtxtThai", gapX, gapY); ic.setControlC1TextBox(ref txtThai, fEdit, "txtThai", 600, xCol2, gapY); gapY += gapLine; ic.setControlLabel(ref lbtxtEng, fEdit, "English :", "lbtxtEng", gapX, gapY); ic.setControlC1TextBox(ref txtEng, fEdit, "txtEng", 600, xCol2, gapY); gapY += gapLine; ic.setControlLabel(ref lbtxtQty, fEdit, "QTY :", "lbtxtQty", gapX, gapY); ic.setControlC1TextBox(ref txtQty, fEdit, "txtQty", 80, xCol2, gapY); txtQty.DataType = typeof(decimal); ic.setControlC1Button(ref btnSave, fEdit, "Save", "btnSave", xCol4, gapY); btnSave.Width = 70; grfDrug = new C1FlexGrid(); grfDrug.Name = "grfDeposit"; grfDrug.Font = fEdit; grfDrug.Dock = System.Windows.Forms.DockStyle.Bottom; grfDrug.Location = new System.Drawing.Point(0, 0); grfDrug.Rows.Count = 1; ContextMenu menuGw = new ContextMenu(); menuGw.MenuItems.Add("Void Drug", new EventHandler(ContextMenu_void_drug)); grfDrug.ContextMenu = menuGw; tabDeposit.Controls.Add(lbtxtDtrName); tabDeposit.Controls.Add(txtDtrName); tabDeposit.Controls.Add(lbcboDrugName); tabDeposit.Controls.Add(cboDrugName); tabDeposit.Controls.Add(lbtxtRemark); tabDeposit.Controls.Add(txtRemark); tabDeposit.Controls.Add(lbtxtThai); tabDeposit.Controls.Add(txtThai); tabDeposit.Controls.Add(lbtxtEng); tabDeposit.Controls.Add(txtEng); tabDeposit.Controls.Add(lbtxtQty); tabDeposit.Controls.Add(txtQty); tabDeposit.Controls.Add(btnSave); tabDeposit.Controls.Add(lbcboTempDrugName); tabDeposit.Controls.Add(cboTempDrugName); tabDeposit.Controls.Add(btnNew); tabDeposit.Controls.Add(grfDrug); this.Controls.Add(tcMain); theme1.SetTheme(lbcboDrugName, ic.theme); theme1.SetTheme(txtEng, ic.theme); Action <Control> setTheme = null; setTheme = (c) => { if (C1.Win.C1Themes.C1ThemeController.IsObjectThemeable(c)) { this.theme1.SetTheme(c, "Office2010Blue"); } foreach (Control cc in c.Controls) { setTheme(cc); } }; setTheme(this); }
/// <summary> /// 初期値を設定している場合、表示フラグをONにしているか検証する。 /// </summary> /// <returns></returns> public bool ValidateVisibleFlg() { foreach (DataRow dr in _initCondition.Tables[CommonConsts.SearchItemTbl].Rows) { CheckBox visible = (CheckBox)this.MainPanel.Controls[dr[CommonConsts.db_name].ToString() + "Visible"]; if (!visible.Checked) { if (dr[CommonConsts.ctl_type].ToString() == CommonConsts.CtlTypePulldownlist || dr[CommonConsts.ctl_type].ToString() == MESConsts.CtlTypeGroupList || dr[CommonConsts.ctl_type].ToString() == MESConsts.CtlTypeItemGroupList) { C1ComboBox ccb = (C1ComboBox)this.MainPanel.Controls[dr[CommonConsts.db_name].ToString()]; if (ccb.SelectedItem != null) { if (ccb.SelectedItem.ToString() != "") { visible.Select(); MessageBox.Show( _mlu.GetMsg(CommonConsts.MSG_VISIBLE_FLG_ERROR) + "(" + dr[CommonConsts.col_name] + ")", _mlu.GetMsg(CommonConsts.TITLE_ERROR), MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } } } else if (dr[CommonConsts.ctl_type].ToString() == CommonConsts.CtlTypeDateRange && ConfigMode) { C1DropDownControl c1 = (C1DropDownControl)this.MainPanel.Controls[dr[CommonConsts.db_name].ToString() + "_1"]; C1DropDownControl c2 = (C1DropDownControl)this.MainPanel.Controls[dr[CommonConsts.db_name].ToString() + "_2"]; if (c1.Value.ToString() != "" || c2.Value.ToString() != "") { visible.Select(); MessageBox.Show( _mlu.GetMsg(CommonConsts.MSG_VISIBLE_FLG_ERROR) + "(" + dr[CommonConsts.col_name] + ")", _mlu.GetMsg(CommonConsts.TITLE_ERROR), MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } } else { Control c1 = null; Control c2 = null; c1 = this.MainPanel.Controls[dr[CommonConsts.db_name].ToString()]; if (c1 != null) { if (c1.Text != "") { visible.Select(); MessageBox.Show( _mlu.GetMsg(CommonConsts.MSG_VISIBLE_FLG_ERROR) + "(" + dr[CommonConsts.col_name] + ")", _mlu.GetMsg(CommonConsts.TITLE_ERROR), MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } } else { c1 = this.MainPanel.Controls[dr[CommonConsts.db_name].ToString() + "_1"]; c2 = this.MainPanel.Controls[dr[CommonConsts.db_name].ToString() + "_2"]; if (c1.Text != "" || c2.Text != "") { visible.Select(); MessageBox.Show( _mlu.GetMsg(CommonConsts.MSG_VISIBLE_FLG_ERROR) + "(" + dr[CommonConsts.col_name] + ")", _mlu.GetMsg(CommonConsts.TITLE_ERROR), MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } } } } } return(true); }
private void ProductSelector_SelectedIndexChanged(object sender, EventArgs e) { C1ComboBox comboBox = sender as C1ComboBox; Model.Instance.FilterByProdcut((Product)comboBox.SelectedItem); }
private void RegionSelector_SelectedIndexChanged(object sender, EventArgs e) { C1ComboBox comboBox = sender as C1ComboBox; Model.Instance.FilterByRegion((Region)comboBox.SelectedItem); }
private void initCompoment() { int gapLine = 25, gapX = 20, gapY = 20, xCol2 = 130, xCol1 = 80, xCol3 = 330, xCol4 = 640, xCol5 = 950; Size size = new Size(); tcMain = new C1DockingTab(); tcMain.Dock = System.Windows.Forms.DockStyle.Fill; tcMain.Location = new System.Drawing.Point(0, 266); tcMain.Name = "tcMain"; tcMain.Size = new System.Drawing.Size(669, 200); tcMain.TabIndex = 0; tcMain.TabsSpacing = 5; tabImportDf = new C1DockingTabPage(); tabImportDf.Dock = System.Windows.Forms.DockStyle.Fill; tabImportDf.Name = "tabImportDf"; tabImportDf.Text = "Import Item DF"; grfSelect = new C1FlexGrid(); grfSelect.Font = fEdit; grfSelect.Dock = System.Windows.Forms.DockStyle.Bottom; grfSelect.Location = new System.Drawing.Point(0, 0); grfSelect.Rows.Count = 1; lbDateStart = new Label(); txtDateStart = new C1DateEdit(); btnDeleteAll = new C1Button(); cboDocGrp = new C1ComboBox(); txtPaidType = new C1TextBox(); lbHn = new Label(); txtHn = new C1TextBox(); btnPrint = new C1Button(); btnGet = new C1Button(); bc.setControlLabel(ref lbDateStart, fEdit, "วันที่เริ่มต้น :", "lbDateStart", gapX, gapY); size = bc.MeasureString(lbDateStart); bc.setControlC1DateTimeEdit(ref txtDateStart, "txtDateStart", lbDateStart.Location.X + size.Width + 5, gapY); bc.setControlC1ComboBox(ref cboDocGrp, "cboDocGrp", 80, txtDateStart.Location.X + txtDateStart.Width + 25, gapY); cboDocGrp.Font = fEdit; ComboBoxItem item = new ComboBoxItem(); item = new ComboBoxItem(); item.Value = "1"; item.Text = "รอบ 1"; cboDocGrp.Items.Add(item); item = new ComboBoxItem(); item.Value = "2"; item.Text = "รอบ 2"; cboDocGrp.Items.Add(item); item = new ComboBoxItem(); item.Value = "3"; item.Text = "รอบ 3"; cboDocGrp.Items.Add(item); //item = new ComboBoxItem(); //item.Value = "3"; //item.Text = "รอบ 3"; //cboDocGrp.Items.Add(item); bc.setControlC1TextBox(ref txtPaidType, fEdit, "txtPaidType", 140, cboDocGrp.Location.X + cboDocGrp.Width + 25, gapY); bc.setControlLabel(ref lbHn, fEdit, "search :", "lbHn", txtPaidType.Location.X + txtPaidType.Width + 55, gapY); size = bc.MeasureString(lbHn); bc.setControlC1TextBox(ref txtHn, fEdit, "txtHn", 140, lbHn.Location.X + lbHn.Width + 10, gapY); bc.setControlC1Button(ref btnDeleteAll, fEdit, "Clear Data", "btnDeleteAll", txtHn.Location.X + txtHn.Width + 20, gapY); btnDeleteAll.Width = 120; btnDeleteAll.Height = btnDeleteAll.Height + 10; bc.setControlC1Button(ref btnPrint, fEdit, "Print", "btnPrint", btnDeleteAll.Location.X + btnDeleteAll.Width + 60, gapY); btnPrint.Width = 140; btnPrint.Height = btnPrint.Height + 10; bc.setControlC1Button(ref btnGet, fEdit, "get", "btnGet", btnPrint.Location.X + btnPrint.Width + 60, gapY); btnGet.Width = 140; btnGet.Height = btnGet.Height + 10; tabImportDf.Controls.Add(grfSelect); theme1.SetTheme(grfSelect, "Office2010Red"); tabImportDf.Controls.Add(lbDateStart); tabImportDf.Controls.Add(txtDateStart); tabImportDf.Controls.Add(cboDocGrp); tabImportDf.Controls.Add(btnDeleteAll); tabImportDf.Controls.Add(btnPrint); tabImportDf.Controls.Add(txtPaidType); tabImportDf.Controls.Add(lbHn); tabImportDf.Controls.Add(txtHn); tabImportDf.Controls.Add(btnGet); tcMain.Controls.Add(tabImportDf); this.Controls.Add(tcMain); }
private void InitComponent() { int gapLine = 30, gapX = 20, gapY = 20; Size size = new Size(); int scrW = Screen.PrimaryScreen.Bounds.Width; fEdit = new Font(ic.iniC.grdViewFontName, ic.grdViewFontSize, FontStyle.Regular); fEditB = new Font(ic.iniC.grdViewFontName, ic.grdViewFontSize, FontStyle.Bold); imgStart = Resources.accept_database24; theme1 = new C1ThemeController(); theme1.Theme = ic.theme; panel1 = new Panel(); panel1.SuspendLayout(); panel1.Dock = System.Windows.Forms.DockStyle.Fill; panel1.Name = "panel1"; txtID = new C1TextBox(); txtID.Font = fEdit; //txtID.Location = new System.Drawing.Point(cboPkg.Location.X, lbName.Location.Y); txtID.Size = new Size(120, 20); txtID.Name = "txtID"; txtID.Hide(); lbDate = new Label(); lbDate.Text = "Date : "; lbDate.Font = fEdit; lbDate.Location = new System.Drawing.Point(gapX, gapY); lbDate.AutoSize = true; lbDate.Name = "lbDate"; txtDate = new C1.Win.C1Input.C1DateEdit(); txtDate.Font = fEdit; txtDate.AllowSpinLoop = false; txtDate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; txtDate.Calendar.ArrowColor = System.Drawing.Color.Black; txtDate.Calendar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); txtDate.Calendar.DayNamesFont = new System.Drawing.Font("Tahoma", 8F); txtDate.Calendar.Font = new System.Drawing.Font("Tahoma", 8F); txtDate.Calendar.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); txtDate.Calendar.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(221)))), ((int)(((byte)(71)))), ((int)(((byte)(47))))); txtDate.Calendar.SelectionForeColor = System.Drawing.Color.White; txtDate.Calendar.TitleBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); txtDate.Calendar.TitleFont = new System.Drawing.Font("Tahoma", 8F); txtDate.Calendar.TitleForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); txtDate.Calendar.TodayBorderColor = System.Drawing.Color.White; txtDate.Calendar.TrailingForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152))))); txtDate.Calendar.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; txtDate.Culture = 1054; txtDate.CurrentTimeZone = false; txtDate.DisabledForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152))))); txtDate.DisplayFormat.CalendarType = C1.Win.C1Input.CalendarType.GregorianCalendar; txtDate.DisplayFormat.FormatType = C1.Win.C1Input.FormatTypeEnum.ShortDate; txtDate.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(((((C1.Win.C1Input.FormatInfoInheritFlags.CustomFormat | C1.Win.C1Input.FormatInfoInheritFlags.NullText) | C1.Win.C1Input.FormatInfoInheritFlags.EmptyAsNull) | C1.Win.C1Input.FormatInfoInheritFlags.TrimStart) | C1.Win.C1Input.FormatInfoInheritFlags.TrimEnd))); txtDate.EditFormat.CalendarType = C1.Win.C1Input.CalendarType.GregorianCalendar; txtDate.EditFormat.FormatType = C1.Win.C1Input.FormatTypeEnum.ShortDate; txtDate.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(((((C1.Win.C1Input.FormatInfoInheritFlags.CustomFormat | C1.Win.C1Input.FormatInfoInheritFlags.NullText) | C1.Win.C1Input.FormatInfoInheritFlags.EmptyAsNull) | C1.Win.C1Input.FormatInfoInheritFlags.TrimStart) | C1.Win.C1Input.FormatInfoInheritFlags.TrimEnd))); txtDate.EmptyAsNull = true; txtDate.GMTOffset = System.TimeSpan.Parse("00:00:00"); txtDate.ImagePadding = new System.Windows.Forms.Padding(0); size = ic.MeasureString(lbDate); txtDate.Location = new System.Drawing.Point(lbDate.Location.X + size.Width + 10, lbDate.Location.Y); txtDate.Name = "txtDate"; txtDate.Size = new System.Drawing.Size(133, 18); txtDate.TabIndex = 510; txtDate.Tag = null; theme1.SetTheme(this.txtDate, "(default)"); txtDate.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; gapY += gapLine; lbPkg = new Label(); lbPkg.Font = fEdit; lbPkg.Name = "lbPkg"; lbPkg.Text = "Package : "; lbPkg.Font = fEdit; lbPkg.Location = new System.Drawing.Point(gapX, gapY); lbPkg.AutoSize = true; cboPkg = new C1ComboBox(); cboPkg.Font = fEdit; cboPkg.Name = "cboPkg"; size = ic.MeasureString(lbPkg); cboPkg.Location = new System.Drawing.Point(lbPkg.Location.X + lbPkg.Width + 20, lbPkg.Location.Y); cboPkg.AllowSpinLoop = false; cboPkg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; cboPkg.DisabledForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152))))); cboPkg.Font = fEdit; cboPkg.GapHeight = 0; cboPkg.ImagePadding = new System.Windows.Forms.Padding(0); cboPkg.ItemsDisplayMember = ""; cboPkg.ItemsValueMember = ""; //cboPkg.Location = new System.Drawing.Point(106, 12); cboPkg.Size = new System.Drawing.Size(480, 20); cboPkg.Style.DropDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); cboPkg.Style.DropDownBorderColor = System.Drawing.Color.Gainsboro; cboPkg.Style.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(222))); cboPkg.TabIndex = 538; cboPkg.Tag = null; theme1.SetTheme(cboPkg, "(default)"); cboPkg.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; gapY += gapLine; lbName = new Label(); lbName.Font = fEdit; lbName.Text = "Name : "; lbName.Location = new System.Drawing.Point(gapX, gapY); lbName.AutoSize = true; lbName.Name = "lbName"; txtName = new C1TextBox(); txtName.Font = fEdit; txtName.Name = "txtName"; size = ic.MeasureString(lbName); txtName.Location = new System.Drawing.Point(cboPkg.Location.X, lbName.Location.Y); txtName.Size = new Size(120, 20); gapY += gapLine; chkEmbryoFreezing = new C1.Win.C1Input.C1CheckBox(); chkEmbryoFreezing.Font = fEdit; chkEmbryoFreezing.Text = "Embryo freezing "; chkEmbryoFreezing.Name = "chkEmbryoFreezing"; chkEmbryoFreezing.BackColor = System.Drawing.Color.Transparent; chkEmbryoFreezing.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); chkEmbryoFreezing.BorderStyle = System.Windows.Forms.BorderStyle.None; chkEmbryoFreezing.FlatStyle = System.Windows.Forms.FlatStyle.Flat; chkEmbryoFreezing.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); chkEmbryoFreezing.Location = new System.Drawing.Point(gapX, gapY); chkEmbryoFreezing.Padding = new System.Windows.Forms.Padding(4, 1, 1, 1); chkEmbryoFreezing.Size = new System.Drawing.Size(180, 24); chkEmbryoFreezing.TabIndex = 553; theme1.SetTheme(this.chkEmbryoFreezing, "(default)"); chkEmbryoFreezing.UseVisualStyleBackColor = true; chkEmbryoFreezing.Value = null; chkEmbryoFreezing.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; chkEmbryoFreezing.AutoSize = true; txtEmbryoFreezing = new C1TextBox(); txtEmbryoFreezing.Font = fEdit; size = ic.MeasureString(chkEmbryoFreezing); txtEmbryoFreezing.Location = new System.Drawing.Point(chkEmbryoFreezing.Location.X + size.Width + 25, chkEmbryoFreezing.Location.Y); txtEmbryoFreezing.Size = new Size(40, 20); txtEmbryoFreezing.Name = "txtEmbryoFreezing"; lbEmbryoFreezing = new Label(); lbEmbryoFreezing.Font = fEdit; lbEmbryoFreezing.Text = "embryos "; lbEmbryoFreezing.Name = "lbEmbryoFreezing"; lbEmbryoFreezing.Location = new System.Drawing.Point(txtEmbryoFreezing.Location.X + txtEmbryoFreezing.Width + 5, chkEmbryoFreezing.Location.Y); lbEmbryoFreezing.AutoSize = true; txtEmbryoStraws = new C1TextBox(); txtEmbryoStraws.Font = fEdit; size = ic.MeasureString(lbEmbryoFreezing); txtEmbryoStraws.Location = new System.Drawing.Point(lbEmbryoFreezing.Location.X + size.Width + 15, chkEmbryoFreezing.Location.Y); txtEmbryoStraws.Size = new Size(40, 20); txtEmbryoStraws.Name = "txtEmbryoStraws"; lbEmbryoStraws = new Label(); lbEmbryoStraws.Font = fEdit; lbEmbryoStraws.Text = "straws (Extra "; lbEmbryoStraws.Name = "lbEmbryoStraws"; lbEmbryoStraws.Location = new System.Drawing.Point(txtEmbryoStraws.Location.X + txtEmbryoStraws.Width + 5, chkEmbryoFreezing.Location.Y); lbEmbryoStraws.AutoSize = true; txtEmbryoStrawsExtra = new C1TextBox(); txtEmbryoStrawsExtra.Font = fEdit; size = ic.MeasureString(lbEmbryoStraws); txtEmbryoStrawsExtra.Location = new System.Drawing.Point(lbEmbryoStraws.Location.X + size.Width + 5, chkEmbryoFreezing.Location.Y); txtEmbryoStrawsExtra.Size = new Size(40, 20); lbEmbryoEmbryo = new Label(); lbEmbryoEmbryo.Font = fEdit; lbEmbryoEmbryo.Text = "embryos) "; lbEmbryoEmbryo.Name = "lbEmbryoEmbryo"; lbEmbryoEmbryo.Location = new System.Drawing.Point(txtEmbryoStrawsExtra.Location.X + txtEmbryoStrawsExtra.Width + 5, chkEmbryoFreezing.Location.Y); lbEmbryoEmbryo.AutoSize = true; gapY += gapLine; chkNGS = new C1.Win.C1Input.C1CheckBox(); chkNGS.Font = fEdit; chkNGS.Text = "NGS "; chkNGS.Name = "chkNGS"; chkNGS.BackColor = System.Drawing.Color.Transparent; chkNGS.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); chkNGS.BorderStyle = System.Windows.Forms.BorderStyle.None; chkNGS.FlatStyle = System.Windows.Forms.FlatStyle.Flat; chkNGS.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); chkNGS.Location = new System.Drawing.Point(gapX, gapY); chkNGS.Padding = new System.Windows.Forms.Padding(4, 1, 1, 1); chkNGS.Size = new System.Drawing.Size(180, 24); chkNGS.TabIndex = 553; theme1.SetTheme(this.chkNGS, "(default)"); chkNGS.UseVisualStyleBackColor = true; chkNGS.Value = null; chkNGS.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; txtNGSEmbryo = new C1TextBox(); txtNGSEmbryo.Font = fEdit; size = ic.MeasureString(chkNGS); txtNGSEmbryo.Location = new System.Drawing.Point(chkNGS.Location.X + chkNGS.Width, chkNGS.Location.Y); txtNGSEmbryo.Size = new Size(60, 20); txtNGSEmbryo.Name = "txtNGSEmbryo"; lbNGSEmbryo = new Label(); lbNGSEmbryo.Font = fEdit; lbNGSEmbryo.Text = "embryo (Extra "; lbNGSEmbryo.Name = "lbNGSEmbryo"; lbNGSEmbryo.Location = new System.Drawing.Point(txtNGSEmbryo.Location.X + txtNGSEmbryo.Width, chkNGS.Location.Y); lbNGSEmbryo.AutoSize = true; txtNGSExtra = new C1TextBox(); txtNGSExtra.Font = fEdit; size = ic.MeasureString(lbNGSEmbryo); txtNGSExtra.Location = new System.Drawing.Point(lbNGSEmbryo.Location.X + lbNGSEmbryo.Width, chkNGS.Location.Y); txtNGSExtra.Size = new Size(60, 20); txtNGSExtra.Name = "txtNGSExtra"; lbNGSExtra = new Label(); lbNGSExtra.Text = "embryos) "; lbNGSExtra.Font = fEdit; lbNGSExtra.Location = new System.Drawing.Point(txtNGSExtra.Location.X + txtNGSExtra.Width, chkNGS.Location.Y); lbNGSExtra.AutoSize = true; lbNGSExtra.Name = "lbNGSExtra"; gapY += gapLine; chkPGS = new C1.Win.C1Input.C1CheckBox(); chkPGS.BackColor = System.Drawing.Color.Transparent; chkPGS.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); chkPGS.BorderStyle = System.Windows.Forms.BorderStyle.None; chkPGS.FlatStyle = System.Windows.Forms.FlatStyle.Flat; chkPGS.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); chkPGS.Location = new System.Drawing.Point(gapX, gapY); chkPGS.Name = "chkPGS"; chkPGS.Text = "PGS "; size = ic.MeasureString(chkPGS); chkPGS.Padding = new System.Windows.Forms.Padding(4, 1, 1, 1); chkPGS.Size = new System.Drawing.Size(size.Width + 30, 24); chkPGS.TabIndex = 553; theme1.SetTheme(this.chkPGS, "(default)"); chkPGS.UseVisualStyleBackColor = true; chkPGS.Value = null; chkPGS.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; chkPGS.Font = fEdit; txtPGSEmbryo = new C1TextBox(); txtPGSEmbryo.Font = fEdit; txtPGSEmbryo.Location = new System.Drawing.Point(chkPGS.Location.X + size.Width + 35, chkPGS.Location.Y); txtPGSEmbryo.Size = new Size(60, 20); txtPGSEmbryo.Name = "txtPGSEmbryo"; lbPGSEmbryo = new Label(); lbPGSEmbryo.Font = fEdit; lbPGSEmbryo.Name = "lbPGSEmbryo"; lbPGSEmbryo.Text = "embryo (Extra "; lbPGSEmbryo.Location = new System.Drawing.Point(txtPGSEmbryo.Location.X + txtPGSEmbryo.Width, chkPGS.Location.Y); lbPGSEmbryo.AutoSize = true; txtPGSExtra = new C1TextBox(); txtPGSExtra.Font = fEdit; size = ic.MeasureString(lbPGSEmbryo); txtPGSExtra.Location = new System.Drawing.Point(lbPGSEmbryo.Location.X + size.Width, chkPGS.Location.Y); txtPGSExtra.Size = new Size(60, 20); txtPGSExtra.Name = "txtPGSExtra"; lbPGSExtra = new Label(); lbPGSExtra.Font = fEdit; lbPGSExtra.Text = "embryos) "; lbPGSExtra.Name = "lbPGSExtra"; lbPGSExtra.Location = new System.Drawing.Point(txtPGSExtra.Location.X + txtPGSExtra.Width, chkPGS.Location.Y); lbPGSExtra.AutoSize = true; gapY += gapLine; chkDay6 = new C1.Win.C1Input.C1CheckBox(); chkDay6.Font = fEdit; chkDay6.Name = "chkPGS"; chkDay6.Text = "Day 6 "; chkDay6.BackColor = System.Drawing.Color.Transparent; chkDay6.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); chkDay6.BorderStyle = System.Windows.Forms.BorderStyle.None; chkDay6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; chkDay6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); chkDay6.Location = new System.Drawing.Point(gapX, gapY); chkDay6.Padding = new System.Windows.Forms.Padding(4, 1, 1, 1); chkDay6.Size = new System.Drawing.Size(180, 24); chkDay6.TabIndex = 553; theme1.SetTheme(this.chkDay6, "(default)"); chkDay6.UseVisualStyleBackColor = true; chkDay6.Value = null; chkDay6.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; gapY += gapLine; chkAssistedHatching = new C1.Win.C1Input.C1CheckBox(); chkAssistedHatching.BackColor = System.Drawing.Color.Transparent; chkAssistedHatching.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); chkAssistedHatching.BorderStyle = System.Windows.Forms.BorderStyle.None; chkAssistedHatching.FlatStyle = System.Windows.Forms.FlatStyle.Flat; chkAssistedHatching.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); chkAssistedHatching.Location = new System.Drawing.Point(gapX, gapY); chkAssistedHatching.Name = "chkAssistedHatching"; chkAssistedHatching.Padding = new System.Windows.Forms.Padding(4, 1, 1, 1); chkAssistedHatching.Size = new System.Drawing.Size(180, 24); chkAssistedHatching.TabIndex = 553; chkAssistedHatching.Text = "Assisted Hatching "; theme1.SetTheme(this.chkAssistedHatching, "(default)"); chkAssistedHatching.UseVisualStyleBackColor = true; chkAssistedHatching.Value = null; chkAssistedHatching.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; chkAssistedHatching.Font = fEdit; gapY += gapLine; chkHA = new C1.Win.C1Input.C1CheckBox(); chkHA.BackColor = System.Drawing.Color.Transparent; chkHA.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); chkHA.BorderStyle = System.Windows.Forms.BorderStyle.None; chkHA.FlatStyle = System.Windows.Forms.FlatStyle.Flat; chkHA.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); chkHA.Location = new System.Drawing.Point(gapX, gapY); chkHA.Name = "chkHA"; chkHA.Padding = new System.Windows.Forms.Padding(4, 1, 1, 1); chkHA.Size = new System.Drawing.Size(180, 24); chkHA.TabIndex = 553; chkHA.Text = "HA Assist selection "; theme1.SetTheme(this.chkHA, "(default)"); chkHA.UseVisualStyleBackColor = true; chkHA.Value = null; chkHA.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; chkHA.Font = fEdit; gapY += gapLine; chkSpermSelection = new C1.Win.C1Input.C1CheckBox(); chkSpermSelection.BackColor = System.Drawing.Color.Transparent; chkSpermSelection.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); chkSpermSelection.BorderStyle = System.Windows.Forms.BorderStyle.None; chkSpermSelection.FlatStyle = System.Windows.Forms.FlatStyle.Flat; chkSpermSelection.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); chkSpermSelection.Location = new System.Drawing.Point(gapX, gapY); chkSpermSelection.Name = "chkSpermSelection"; chkSpermSelection.Padding = new System.Windows.Forms.Padding(4, 1, 1, 1); chkSpermSelection.Size = new System.Drawing.Size(180, 24); chkSpermSelection.TabIndex = 553; chkSpermSelection.Text = "Sperm Selection "; theme1.SetTheme(this.chkSpermSelection, "(default)"); chkSpermSelection.UseVisualStyleBackColor = true; chkSpermSelection.Value = null; chkSpermSelection.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; chkSpermSelection.Font = fEdit; txtSpermSelection = new C1TextBox(); txtSpermSelection.Font = fEdit; size = ic.MeasureString(chkSpermSelection); txtSpermSelection.Location = new System.Drawing.Point(chkSpermSelection.Location.X + chkSpermSelection.Width, chkSpermSelection.Location.Y); txtSpermSelection.Size = new Size(60, 20); txtSpermSelection.Name = "txtSpermSelection"; gapY += gapLine; chkSpermPrecaution = new C1.Win.C1Input.C1CheckBox(); chkSpermPrecaution.BackColor = System.Drawing.Color.Transparent; chkSpermPrecaution.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); chkSpermPrecaution.BorderStyle = System.Windows.Forms.BorderStyle.None; chkSpermPrecaution.FlatStyle = System.Windows.Forms.FlatStyle.Flat; chkSpermPrecaution.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); chkSpermPrecaution.Location = new System.Drawing.Point(gapX, gapY); chkSpermPrecaution.Name = "chkSpermPrecaution"; chkSpermPrecaution.Padding = new System.Windows.Forms.Padding(4, 1, 1, 1); chkSpermPrecaution.Size = new System.Drawing.Size(180, 24); chkSpermPrecaution.TabIndex = 553; chkSpermPrecaution.Text = "Sperm Precaution "; theme1.SetTheme(this.chkSpermPrecaution, "(default)"); chkSpermPrecaution.UseVisualStyleBackColor = true; chkSpermPrecaution.Value = null; chkSpermPrecaution.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; chkSpermPrecaution.Font = fEdit; txtSpermPrecaution = new C1TextBox(); txtSpermPrecaution.Font = fEdit; size = ic.MeasureString(chkSpermPrecaution); txtSpermPrecaution.Location = new System.Drawing.Point(chkSpermPrecaution.Location.X + chkSpermPrecaution.Width, chkSpermPrecaution.Location.Y); txtSpermPrecaution.Size = new Size(60, 20); txtSpermPrecaution.Name = "txtSpermPrecaution"; gapY += gapLine; chkEmbryoGlue = new C1.Win.C1Input.C1CheckBox(); chkEmbryoGlue.BackColor = System.Drawing.Color.Transparent; chkEmbryoGlue.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); chkEmbryoGlue.BorderStyle = System.Windows.Forms.BorderStyle.None; chkEmbryoGlue.FlatStyle = System.Windows.Forms.FlatStyle.Flat; chkEmbryoGlue.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); chkEmbryoGlue.Location = new System.Drawing.Point(gapX, gapY); chkEmbryoGlue.Name = "chkEmbryoGlue"; chkEmbryoGlue.Padding = new System.Windows.Forms.Padding(4, 1, 1, 1); chkEmbryoGlue.Size = new System.Drawing.Size(180, 24); chkEmbryoGlue.TabIndex = 553; chkEmbryoGlue.Text = "Embryo Glue "; theme1.SetTheme(this.chkEmbryoGlue, "(default)"); chkEmbryoGlue.UseVisualStyleBackColor = true; chkEmbryoGlue.Value = null; chkEmbryoGlue.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; chkEmbryoGlue.Font = fEdit; gapY += gapLine; chkEmbryoRemaining = new C1.Win.C1Input.C1CheckBox(); chkEmbryoRemaining.BackColor = System.Drawing.Color.Transparent; chkEmbryoRemaining.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); chkEmbryoRemaining.BorderStyle = System.Windows.Forms.BorderStyle.None; chkEmbryoRemaining.FlatStyle = System.Windows.Forms.FlatStyle.Flat; chkEmbryoRemaining.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); chkEmbryoRemaining.Location = new System.Drawing.Point(gapX, gapY); chkEmbryoRemaining.Name = "chkEmbryoRemaining"; chkEmbryoRemaining.Padding = new System.Windows.Forms.Padding(4, 1, 1, 1); chkEmbryoRemaining.Size = new System.Drawing.Size(180, 24); chkEmbryoRemaining.TabIndex = 553; chkEmbryoRemaining.Text = "Embryo Remaining "; theme1.SetTheme(this.chkEmbryoRemaining, "(default)"); chkEmbryoRemaining.UseVisualStyleBackColor = true; chkEmbryoRemaining.Value = null; chkEmbryoRemaining.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; chkEmbryoRemaining.Font = fEdit; txtEmbryoRemaining = new C1TextBox(); txtEmbryoRemaining.Font = fEdit; size = ic.MeasureString(chkSpermPrecaution); txtEmbryoRemaining.Location = new System.Drawing.Point(chkEmbryoRemaining.Location.X + chkEmbryoRemaining.Width, chkEmbryoRemaining.Location.Y); txtEmbryoRemaining.Size = new Size(60, 20); txtEmbryoRemaining.Name = "txtEmbryoRemaining"; lbEmbryoRemaining = new Label(); lbEmbryoRemaining.Text = "embryos "; lbEmbryoRemaining.Font = fEdit; lbEmbryoRemaining.Location = new System.Drawing.Point(txtPGSExtra.Location.X + txtPGSExtra.Width, chkPGS.Location.Y); lbEmbryoRemaining.AutoSize = true; lbEmbryoRemaining.Name = "lbEmbryoRemaining"; gapY += gapLine; chkDiscardAll = new C1.Win.C1Input.C1CheckBox(); chkDiscardAll.Font = fEdit; chkDiscardAll.Name = "chkDiscardAll"; chkDiscardAll.Text = "Discard All Embryos "; chkDiscardAll.BackColor = System.Drawing.Color.Transparent; chkDiscardAll.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); chkDiscardAll.BorderStyle = System.Windows.Forms.BorderStyle.None; chkDiscardAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat; chkDiscardAll.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); chkDiscardAll.Location = new System.Drawing.Point(gapX, gapY); chkDiscardAll.Padding = new System.Windows.Forms.Padding(4, 1, 1, 1); chkDiscardAll.Size = new System.Drawing.Size(180, 24); chkDiscardAll.TabIndex = 553; theme1.SetTheme(this.chkDiscardAll, "(default)"); chkDiscardAll.UseVisualStyleBackColor = true; chkDiscardAll.Value = null; chkDiscardAll.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; gapY += gapLine; lbStfId = new Label(); lbStfId.Font = fEdit; lbStfId.Name = "lbStfId"; lbStfId.Text = "Staff : "; lbStfId.Location = new System.Drawing.Point(gapX, gapY); lbStfId.AutoSize = true; cboStfId = new C1ComboBox(); cboStfId.Font = fEdit; size = ic.MeasureString(lbStfId); cboStfId.Location = new System.Drawing.Point(cboPkg.Location.X, lbStfId.Location.Y); cboStfId.AllowSpinLoop = false; cboStfId.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; cboStfId.DisabledForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152))))); cboStfId.Font = fEdit; cboStfId.GapHeight = 0; cboStfId.ImagePadding = new System.Windows.Forms.Padding(0); cboStfId.ItemsDisplayMember = ""; cboStfId.ItemsValueMember = ""; cboStfId.Name = "cboStfId"; cboStfId.Size = new System.Drawing.Size(180, 20); cboStfId.Style.DropDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); cboStfId.Style.DropDownBorderColor = System.Drawing.Color.Gainsboro; cboStfId.Style.Font = fEdit; cboStfId.TabIndex = 538; cboStfId.Tag = null; theme1.SetTheme(cboStfId, "(default)"); cboStfId.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; gapY += gapLine; lbChkId = new Label(); lbChkId.Font = fEdit; lbChkId.Text = "Check By : "; lbChkId.Name = "lbChkId"; lbChkId.Location = new System.Drawing.Point(gapX, gapY); lbChkId.AutoSize = true; cboChkId = new C1ComboBox(); cboChkId.Font = fEdit; cboChkId.Name = "cboChkId"; size = ic.MeasureString(lbChkId); cboChkId.Location = new System.Drawing.Point(cboPkg.Location.X, lbChkId.Location.Y); cboChkId.AllowSpinLoop = false; cboChkId.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; cboChkId.DisabledForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152))))); cboChkId.Font = fEdit; cboChkId.GapHeight = 0; cboChkId.ImagePadding = new System.Windows.Forms.Padding(0); cboChkId.ItemsDisplayMember = ""; cboChkId.ItemsValueMember = ""; cboChkId.Size = new System.Drawing.Size(180, 20); cboChkId.Style.DropDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); cboChkId.Style.DropDownBorderColor = System.Drawing.Color.Gainsboro; cboChkId.Style.Font = fEdit; cboChkId.TabIndex = 538; cboChkId.Tag = null; theme1.SetTheme(cboChkId, "(default)"); cboChkId.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2010Blue; gapY += gapLine; btnSave = new C1Button(); btnSave.Font = fEdit; btnSave.Name = "btnLisStart"; btnSave.Text = "Save"; //size = bc.MeasureString(btnHnSearch); btnSave.Location = new System.Drawing.Point(gapX, gapY); btnSave.Size = new Size(70, 60); btnSave.Font = fEdit; btnSave.Image = imgStart; btnSave.TextAlign = ContentAlignment.MiddleRight; btnSave.ImageAlign = ContentAlignment.MiddleLeft; //panel1.Controls.Add(chkNGS); panel1.Controls.Add(lbDate); panel1.Controls.Add(txtDate); panel1.Controls.Add(lbPkg); panel1.Controls.Add(cboPkg); panel1.Controls.Add(lbName); panel1.Controls.Add(txtName); panel1.Controls.Add(chkEmbryoFreezing); panel1.Controls.Add(txtEmbryoFreezing); panel1.Controls.Add(lbEmbryoFreezing); panel1.Controls.Add(txtEmbryoStraws); panel1.Controls.Add(lbEmbryoStraws); panel1.Controls.Add(txtEmbryoStrawsExtra); panel1.Controls.Add(lbEmbryoEmbryo); panel1.Controls.Add(chkNGS); panel1.Controls.Add(chkPGS); //panel1.Controls.Add(lbPGSEmbryo); panel1.Controls.Add(txtPGSEmbryo); panel1.Controls.Add(lbPGSEmbryo); panel1.Controls.Add(txtPGSExtra); panel1.Controls.Add(lbPGSExtra); panel1.Controls.Add(txtSpermSelection); panel1.Controls.Add(txtSpermPrecaution); panel1.Controls.Add(txtEmbryoRemaining); panel1.Controls.Add(lbEmbryoRemaining); panel1.Controls.Add(chkDay6); panel1.Controls.Add(chkHA); panel1.Controls.Add(chkSpermSelection); panel1.Controls.Add(chkSpermPrecaution); panel1.Controls.Add(chkEmbryoGlue); panel1.Controls.Add(chkEmbryoRemaining); panel1.Controls.Add(chkDiscardAll); panel1.Controls.Add(lbStfId); panel1.Controls.Add(cboStfId); panel1.Controls.Add(lbChkId); panel1.Controls.Add(cboChkId); panel1.Controls.Add(btnSave); this.Controls.Add(panel1); setTheme(); panel1.ResumeLayout(false); panel1.PerformLayout(); this.PerformLayout(); }
private void initCompomentTabDeposit() { int gapLine = 25, gapX = 20, gapY = 20, xCol2 = 150, xCol1 = 80, xCol3 = 330, xCol4 = 640, xCol5 = 950; Size size = new Size(); tabDeposit = new C1DockingTabPage(); tabDeposit.Location = new System.Drawing.Point(1, 24); //tabScan.Name = "c1DockingTabPage1"; tabDeposit.Size = new System.Drawing.Size(667, 175); tabDeposit.TabIndex = 0; tabDeposit.Text = "Deposit"; tabDeposit.Name = "tabDeposit"; tcMain.Controls.Add(tabDeposit); lbtxtDepositCode = new Label(); lbtxtDepositDate = new Label(); lbtxtHn = new Label(); lbtxtName = new Label(); lbtxtDeposit = new Label(); lbtxtRemark = new Label(); txtDepositDate = new C1DateEdit(); txtDepositCode = new C1TextBox(); txtHn = new C1TextBox(); txtName = new C1TextBox(); txtDeposit = new C1TextBox(); txtRemark = new C1TextBox(); btnSave = new C1Button(); btnSearch = new C1Button(); chkAll = new C1CheckBox(); chkActive = new RadioButton(); chkUnActive = new RadioButton(); txtId = new C1TextBox(); lbcboPackage = new Label(); cboPackage = new C1ComboBox(); btnNew = new C1Button(); ic.setControlLabel(ref lbtxtDepositCode, fEdit, "code :", "lbtxtDepositCode", gapX, gapY); ic.setControlC1TextBox(ref txtDepositCode, fEdit, "txtDepositCode", 120, xCol2, gapY); ic.setControlC1CheckBox(ref chkAll, fEdit, "All", "chkAll", xCol4, gapY); //gapY += gapLine; ic.setControlLabel(ref lbtxtDepositDate, fEdit, "Date Deposit :", "lbtxtDepositDate", xCol3, gapY); size = ic.MeasureString(lbtxtDepositDate); ic.setControlC1DateTimeEdit(ref txtDepositDate, "txtDepositDate", lbtxtDepositDate.Location.X + size.Width + 15, gapY); gapY += gapLine; ic.setControlLabel(ref lbtxtHn, fEdit, "HN :", "lbtxtHn", gapX, gapY); ic.setControlC1TextBox(ref txtHn, fEdit, "txtHn", 120, xCol2, gapY); ic.setControlC1Button(ref btnSearch, fEdit, "...", "btnSearch", txtHn.Location.X + txtHn.Width + 10, gapY - 4); btnSearch.Width = 30; btnSearch.Height = 25; ic.setControlLabel(ref lbtxtDeposit, fEdit, "Deposit :", "lbtxtDeposit", xCol3, gapY); size = ic.MeasureString(lbtxtDeposit); ic.setControlC1TextBox(ref txtDeposit, fEdit, "txtDeposit", 120, txtDepositDate.Location.X, gapY); txtDeposit.NumericInput = true; txtDeposit.DataType = typeof(decimal); ic.setControlRadioBox(ref chkActive, fEdit, "Active", "chkActive", xCol4, gapY); ic.setControlRadioBox(ref chkUnActive, fEdit, "UnActive", "chkUnActive", chkActive.Location.X + 80, gapY); gapY += gapLine; ic.setControlLabel(ref lbtxtName, fEdit, "Name :", "lbtxtName", gapX, gapY); ic.setControlC1TextBox(ref txtName, fEdit, "txtName", 400, xCol2, gapY); //gapY += gapLine; gapY += gapLine; ic.setControlLabel(ref lbtxtRemark, fEdit, "Remark :", "lbtxtRemark", gapX, gapY); ic.setControlC1TextBox(ref txtRemark, fEdit, "txtRemark", 400, xCol2, gapY); //gapY += gapLine; ic.setControlC1Button(ref btnSave, fEdit, "Save", "btnSave", xCol4, gapY); btnSave.Width = 70; ic.setControlC1Button(ref btnNew, fEdit, "New", "btnNew", btnSave.Location.X + btnSave.Width + 30, gapY); btnNew.Width = 70; gapY += gapLine; ic.setControlLabel(ref lbcboPackage, fEdit, "Package :", "lbcboPackage", gapX, gapY); ic.setControlC1ComboBox(ref cboPackage, "cboPackage", 400, xCol2, gapY); grfDeposit = new C1FlexGrid(); grfDeposit.Name = "grfDeposit"; grfDeposit.Font = fEdit; grfDeposit.Dock = System.Windows.Forms.DockStyle.Bottom; grfDeposit.Location = new System.Drawing.Point(0, 0); grfDeposit.Rows.Count = 1; tabDeposit.Controls.Add(grfDeposit); tabDeposit.Controls.Add(lbtxtDepositCode); tabDeposit.Controls.Add(txtDepositCode); tabDeposit.Controls.Add(lbtxtDepositDate); tabDeposit.Controls.Add(txtDepositDate); tabDeposit.Controls.Add(lbtxtHn); tabDeposit.Controls.Add(txtHn); tabDeposit.Controls.Add(lbtxtName); tabDeposit.Controls.Add(txtName); tabDeposit.Controls.Add(lbtxtDeposit); tabDeposit.Controls.Add(txtDeposit); tabDeposit.Controls.Add(lbtxtRemark); tabDeposit.Controls.Add(txtRemark); tabDeposit.Controls.Add(btnSave); tabDeposit.Controls.Add(btnSearch); tabDeposit.Controls.Add(chkAll); tabDeposit.Controls.Add(chkActive); tabDeposit.Controls.Add(chkUnActive); tabDeposit.Controls.Add(lbcboPackage); tabDeposit.Controls.Add(cboPackage); tabDeposit.Controls.Add(btnNew); }
/// <summary> /// SelectedIndex設定 C1ComboBox /// </summary> /// <param name="ccb"></param> /// <param name="candidateTbl"></param> /// <param name="selectedcode"></param> public static void SetSelectIndexFromCode(C1ComboBox ccb, DataTable candidateTbl, string selectedcode) { //※BindingSource利用時は、SelectedItem,SelectedTextが動作しないので、SelectedIndexで初期選択を行う DataRow[] dra = candidateTbl.Select("convert(" + CommonConsts.code + ", 'System.String') = '" + selectedcode + "'"); ccb.SelectedIndex = candidateTbl.Rows.IndexOf(dra[0]); }
private void setGrfEggStiDay() { //grfDept.Rows.Count = 7; grfEggsd.Clear(); DataTable dt = new DataTable(); dt = ic.ivfDB.eggsdDB.selectByEggStiId(txtId.Text); //grfExpn.Rows.Count = dt.Rows.Count + 1; grfEggsd.Rows.Count = 1; grfEggsd.Cols.Count = 15; C1TextBox txt = new C1TextBox(); C1ComboBox cboday3 = new C1ComboBox(); C1ComboBox cboday3desc1 = new C1ComboBox(); C1ComboBox cbomedi = new C1ComboBox(); cboday3.AutoCompleteMode = AutoCompleteMode.Suggest; cboday3.AutoCompleteSource = AutoCompleteSource.ListItems; cboday3desc1.AutoCompleteMode = AutoCompleteMode.Suggest; cboday3desc1.AutoCompleteSource = AutoCompleteSource.ListItems; cbomedi.AutoCompleteMode = AutoCompleteMode.Suggest; cbomedi.AutoCompleteSource = AutoCompleteSource.ListItems; ic.ivfDB.fdtDB.setCboEggStiRtOvary1(cboday3, ""); ic.ivfDB.fdtDB.setCboEggStiRtOvary2(cboday3desc1, ""); ic.ivfDB.fdtDB.setCboEggStiMedication(cbomedi, ""); grfEggsd.Cols[colLt1].Editor = cboday3; grfEggsd.Cols[colLt2].Editor = cboday3desc1; grfEggsd.Cols[colRt1].Editor = cboday3; grfEggsd.Cols[colRt2].Editor = cboday3desc1; grfEggsd.Cols[colMedi].Editor = cbomedi; grfEggsd.Cols[colDay].Width = 40; grfEggsd.Cols[colDate].Width = 100; grfEggsd.Cols[colE2].Width = 70; grfEggsd.Cols[colLH].Width = 70; grfEggsd.Cols[colFSH].Width = 70; grfEggsd.Cols[colProlactin].Width = 70; grfEggsd.Cols[colRt1].Width = 120; grfEggsd.Cols[colRt2].Width = 70; grfEggsd.Cols[colLt1].Width = 120; grfEggsd.Cols[colLt2].Width = 70; grfEggsd.Cols[colEndo].Width = 70; grfEggsd.Cols[colMedi].Width = 120; grfEggsd.Cols[colE2].AllowSorting = false; grfEggsd.Cols[colLH].AllowSorting = false; grfEggsd.Cols[colFSH].AllowSorting = false; grfEggsd.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfEggsd.Cols[colDay].Caption = "day"; grfEggsd.Cols[colDate].Caption = "date"; grfEggsd.Cols[colE2].Caption = "E2"; grfEggsd.Cols[colLH].Caption = "LH"; grfEggsd.Cols[colFSH].Caption = "FSH"; grfEggsd.Cols[colProlactin].Caption = "Prolactin"; grfEggsd.Cols[colRt1].Caption = "Rt ovary"; grfEggsd.Cols[colRt2].Caption = "Rt ovary"; grfEggsd.Cols[colLt1].Caption = "Lt ovary"; grfEggsd.Cols[colLt2].Caption = "Lt ovary"; grfEggsd.Cols[colEndo].Caption = "Endo"; grfEggsd.Cols[colMedi].Caption = "Medication"; Color color = ColorTranslator.FromHtml(ic.iniC.grfRowColor); //CellRange rg1 = grfBank.GetCellRange(1, colE, grfBank.Rows.Count, colE); //rg1.Style = grfBank.Styles["date"]; int i = 1; String staffId = "", checkId = "", dateday2 = ""; foreach (DataRow row in dt.Rows) { Row row1 = grfEggsd.Rows.Add(); //staffId = row[ic.ivfDB.opuEmDevDB.opuEmDev.staff_id].ToString(); //checkId = row[ic.ivfDB.opuEmDevDB.opuEmDev.checked_id].ToString(); row1[colId] = row[ic.ivfDB.eggsdDB.eggsd.egg_sti_day_id].ToString(); row1[colDay] = row[ic.ivfDB.eggsdDB.eggsd.day1].ToString(); row1[colDate] = ic.datetoShow(row[ic.ivfDB.eggsdDB.eggsd.date].ToString()); row1[colE2] = row[ic.ivfDB.eggsdDB.eggsd.e2].ToString(); row1[colLH] = row[ic.ivfDB.eggsdDB.eggsd.lh].ToString(); row1[colFSH] = row[ic.ivfDB.eggsdDB.eggsd.fsh].ToString(); row1[colProlactin] = row[ic.ivfDB.eggsdDB.eggsd.prolactin].ToString(); row1[colRt1] = row[ic.ivfDB.eggsdDB.eggsd.rt_ovary_1].ToString(); row1[colRt2] = row[ic.ivfDB.eggsdDB.eggsd.rt_ovary_2].ToString(); row1[colLt1] = row[ic.ivfDB.eggsdDB.eggsd.lt_ovary_1].ToString(); row1[colLt2] = row[ic.ivfDB.eggsdDB.eggsd.lt_ovary_2].ToString(); row1[colEndo] = row[ic.ivfDB.eggsdDB.eggsd.endo].ToString(); row1[colMedi] = row[ic.ivfDB.eggsdDB.eggsd.medication].ToString(); row1[colEdit] = ""; row1[0] = i; i++; } grfEggsd.Rows.Add(); grfEggsd.Cols[colId].Visible = false; grfEggsd.Cols[colEdit].Visible = false; //grfEggsd.Cols[colProlactin].Visible = false; grfEggsd.AutoClipboard = true; }
private void InitComponent() { int gapY = 30, gapX = 20, gapLine = 5, gapColName = 70; Size size = new Size(); theme1 = new C1ThemeController(); theme1.Theme = ic.iniC.themeApplication; pnTop = new Panel(); pnTop.Dock = DockStyle.Top; pnTop.Size = new Size(20, 60); pnBody = new Panel(); pnBody.Dock = DockStyle.Fill; pnTop.SuspendLayout(); pnBody.SuspendLayout(); this.SuspendLayout(); lbYear = new Label(); lbYear.Text = "Year :"; lbYear.Font = fEdit; lbYear.Location = new System.Drawing.Point(gapX, gapLine); lbYear.AutoSize = true; lbYear.Name = "lbYear"; size = ic.MeasureString(lbYear); cboYear = new C1ComboBox(); cboYear.AllowSpinLoop = false; cboYear.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; cboYear.Font = fEdit; cboYear.GapHeight = 0; cboYear.ImagePadding = new System.Windows.Forms.Padding(0); cboYear.ItemsDisplayMember = ""; cboYear.ItemsValueMember = ""; cboYear.Location = new System.Drawing.Point(size.Width + 20, lbYear.Location.Y); cboYear.Name = "cboYear"; cboYear.Size = new System.Drawing.Size(184, 20); cboYear.TabIndex = 562; cboYear.Tag = null; theme1.SetTheme(cboYear, "(default)"); cboYear.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; cboYear.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; cboYear.Location = new Point(gapColName, lbYear.Location.Y); btnNew = new C1Button(); btnNew.Name = "btnNew"; btnNew.Text = "New 2019"; btnNew.Font = this.fEdit; size = ic.MeasureString(btnNew); btnNew.Size = new Size(100, 40); btnNew.Location = new Point(cboYear.Location.X + cboYear.Width + 40, lbYear.Location.Y); btnNew.Click += BtnNew_Click; btnSave = new C1Button(); btnSave.Name = "btnSave"; btnSave.Text = "Save 2019"; btnSave.Font = this.fEdit; size = ic.MeasureString(btnSave); btnSave.Size = new Size(100, 40); btnSave.Location = new Point(btnNew.Location.X + btnNew.Width + 40, lbYear.Location.Y); btnSave.Click += BtnSave_Click; tC1 = new C1DockingTab(); tC1.Dock = System.Windows.Forms.DockStyle.Fill; tC1.HotTrack = true; tC1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; tC1.TabSizeMode = C1.Win.C1Command.TabSizeModeEnum.Fit; tC1.TabsShowFocusCues = true; tC1.Alignment = TabAlignment.Top; tC1.SelectedTabBold = true; tC1.Name = "tC1"; tC1.CanCloseTabs = true; tab2019 = new C1DockingTabPage(); tC1.SuspendLayout(); tab2019.SuspendLayout(); tab2019.Name = "tabOnhand"; tab2019.TabIndex = 0; tab2019.Text = "Onhand"; theme1.SetTheme(tC1, ic.theme); pnTop.Controls.Add(lbYear); pnTop.Controls.Add(cboYear); pnTop.Controls.Add(lbStkSubName); //pnTop.Controls.Add(cboStkSubName); pnTop.Controls.Add(btnNew); pnTop.Controls.Add(btnSave); this.Controls.Add(pnBody); this.Controls.Add(pnTop); tC1.Controls.Add(tab2019); pnBody.Controls.Add(tC1); theme1.SetTheme(pnBody, ic.iniC.themeApp); theme1.SetTheme(pnTop, "Office2010Red"); pnTop.ResumeLayout(false); pnBody.ResumeLayout(false); tC1.ResumeLayout(false); tab2019.ResumeLayout(false); this.ResumeLayout(false); pnBody.PerformLayout(); pnTop.PerformLayout(); tC1.PerformLayout(); tab2019.PerformLayout(); this.PerformLayout(); }
private void InitComponent() { int gapY = 30, gapX = 20, gapLine = 5, gapColName = 70; Size size = new Size(); theme1 = new C1ThemeController(); theme1.Theme = ic.iniC.themeApplication; pnTop = new Panel(); pnTop.Dock = DockStyle.Top; pnTop.Size = new Size(20, 60); pnBody = new Panel(); pnBody.Dock = DockStyle.Fill; pnTop.SuspendLayout(); pnBody.SuspendLayout(); lbYear = new Label(); lbYear.Text = "Year :"; lbYear.Font = fEdit; lbYear.Location = new System.Drawing.Point(gapX, gapLine); lbYear.AutoSize = true; lbYear.Name = "lbYear"; size = ic.MeasureString(lbYear); cboYear = new C1ComboBox(); cboYear.AllowSpinLoop = false; cboYear.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; cboYear.Font = fEdit; cboYear.GapHeight = 0; cboYear.ImagePadding = new System.Windows.Forms.Padding(0); cboYear.ItemsDisplayMember = ""; cboYear.ItemsValueMember = ""; cboYear.Location = new System.Drawing.Point(size.Width + 20, lbYear.Location.Y); cboYear.Name = "cboYear"; cboYear.Size = new System.Drawing.Size(184, 20); cboYear.TabIndex = 562; cboYear.Tag = null; theme1.SetTheme(cboYear, "(default)"); cboYear.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; cboYear.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; cboYear.Location = new Point(gapColName, lbYear.Location.Y); lbStkSubName = new Label(); lbStkSubName.Text = "รับเข้า :"; lbStkSubName.Font = fEdit; lbStkSubName.Location = new System.Drawing.Point(gapX, lbYear.Location.Y); lbStkSubName.AutoSize = true; lbStkSubName.Name = "lbStkSubName"; cboStkSubName = new C1ComboBox(); cboStkSubName.AllowSpinLoop = false; cboStkSubName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; cboYear.Font = fEdit; cboStkSubName.GapHeight = 0; cboStkSubName.ImagePadding = new System.Windows.Forms.Padding(0); cboStkSubName.ItemsDisplayMember = ""; cboStkSubName.ItemsValueMember = ""; cboStkSubName.Location = new System.Drawing.Point(662, lbStkSubName.Location.Y); cboStkSubName.Name = "cboStkSubName"; cboStkSubName.Size = new System.Drawing.Size(400, 20); cboStkSubName.TabIndex = 562; cboStkSubName.Tag = null; theme1.SetTheme(cboStkSubName, "(default)"); cboStkSubName.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; cboStkSubName.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; cboStkSubName.Location = new Point(gapColName, lbStkSubName.Location.Y); btnNew = new C1Button(); btnNew.Name = "btnNew"; btnNew.Text = "ป้อนรับเข้า"; btnNew.Font = this.fEdit; size = ic.MeasureString(btnNew); btnNew.Size = new Size(60, 40); btnNew.Location = new Point(pnBody.Width - size.Width - 40, lbStkSubName.Location.Y); btnNew.Click += BtnNew_Click; pnTop.Controls.Add(lbYear); pnTop.Controls.Add(cboYear); pnTop.Controls.Add(lbStkSubName); pnTop.Controls.Add(cboStkSubName); pnTop.Controls.Add(btnNew); this.Controls.Add(pnBody); this.Controls.Add(pnTop); theme1.SetTheme(pnBody, ic.iniC.themeApp); theme1.SetTheme(pnTop, "Office2010Red"); pnTop.ResumeLayout(false); pnBody.ResumeLayout(false); pnBody.PerformLayout(); pnTop.PerformLayout(); }