private void textBox_Leave(object sender, EventArgs e) { C1TextBox a = (C1TextBox)sender; a.BackColor = bg; a.ForeColor = fc; a.Font = new Font(ff, FontStyle.Regular); }
private void textBox_Enter(object sender, EventArgs e) { C1TextBox a = (C1TextBox)sender; a.BackColor = Color.DarkCyan; a.Font = new Font(ff, FontStyle.Bold); //a.ForeColor = Color.Black; }
private void initControl() { this.Width = 250; this.Height = 120; this.MinimizeBox = false; this.MaximizeBox = false; this.FormBorderStyle = FormBorderStyle.FixedSingle; label1 = new System.Windows.Forms.Label(); label2 = new System.Windows.Forms.Label(); txtPassword = new C1.Win.C1Input.C1TextBox(); theme1 = new C1.Win.C1Themes.C1ThemeController(); theme1.Theme = "Office2013Red"; //C1ThemeController.ApplicationTheme = ic.iniC.themeApplication; theme1.Theme = C1ThemeController.ApplicationTheme; stt = new C1SuperTooltip(); sep = new C1SuperErrorProvider(); label1.AutoSize = true; label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(222))); label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); label1.Location = new System.Drawing.Point(10, 20); //label1.Size = new System.Drawing.Size(68, 16); label1.TabIndex = 0; label1.Text = "รหัสผ่าน :"; label2.AutoSize = true; label2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(222))); label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); label2.Location = new System.Drawing.Point(10, label1.Top + 30); //label1.Size = new System.Drawing.Size(68, 16); label2.TabIndex = 1; label2.Text = "-"; txtPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; txtPassword.DisabledForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(152)))), ((int)(((byte)(152))))); txtPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(222))); txtPassword.Location = new System.Drawing.Point(80, 20); txtPassword.Name = "txtContFNameE"; txtPassword.Size = new System.Drawing.Size(100, 20); txtPassword.TabIndex = 84; txtPassword.Tag = null; txtPassword.PasswordChar = '*'; txtPassword.KeyUp += new KeyEventHandler(this.txtPassword_KeyUp); theme1.SetTheme(this.txtPassword, "(default)"); this.StartPosition = FormStartPosition.CenterParent; this.Controls.Add(label1); this.Controls.Add(label2); this.Controls.Add(txtPassword); }
private void setGrfCu() { //grfDept.Rows.Count = 7; grfCu.Clear(); DataTable dt = new DataTable(); grfCu.DataSource = null; //ConnectDB con = new ConnectDB(bc.iniC); //con.OpenConnectionEx(); dt = bc.bcDB.pttDB.selectPatient(txtSearch.Text, txtSearch.Text); //con.CloseConnectionEx(); //grfExpn.Rows.Count = dt.Rows.Count + 1; grfCu.Rows.Count = 1; grfCu.Cols.Count = 3; C1TextBox txt = new C1TextBox(); C1ComboBox cboproce = new C1ComboBox(); //ic.ivfDB.itmDB.setCboItem(cboproce); grfCu.Cols[colCuHn].Editor = txt; grfCu.Cols[colCuName].Editor = txt; grfCu.Cols[colCuHn].Width = 70; grfCu.Cols[colCuName].Width = 240; //grfCu.Cols[colCuTime].Width = 80; grfCu.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfCu.Cols[colCuHn].Caption = "HN"; grfCu.Cols[colCuName].Caption = "Name"; 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 = grfCu.Rows.Add(); row[0] = (i + 1); row[colCuHn] = dt.Rows[i]["MNC_HN_NO"].ToString(); row[colCuName] = dt.Rows[i]["prefix"].ToString() + " " + dt.Rows[i]["MNC_FNAME_T"].ToString() + " " + dt.Rows[i]["MNC_LNAME_T"].ToString(); //row[colCuDate] = bc.datetoShow(dt.Rows[i]["VDate"].ToString()); } grfCu.Cols[colCuHn].AllowEditing = false; grfCu.Cols[colCuName].AllowEditing = false; if (dt.Rows.Count == 1) { if (grfCu[1, colCuHn] != null) { setGrfVn(grfCu[1, colCuHn].ToString()); } } }
private void TxtUserName_LostFocus(object sender, EventArgs e) { //throw new NotImplementedException(); C1TextBox a = (C1TextBox)sender; a.BackColor = bg; //a.ForeColor = fc; //a.Font = new Font(ff, FontStyle.Regular); chkLogin(); }
private void textBox_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { C1TextBox a = (C1TextBox)sender; if (a.Name.Equals("txtStfCode")) { txtStfFNameT.Focus(); return; } if (a.Name.Equals("txtStfFNameT")) { txtStfLNameT.Focus(); return; } if (a.Name.Equals("txtStfLNameT")) { txtTele.Focus(); return; } if (a.Name.Equals("txtTele")) { txtMobile.Focus(); return; } if (a.Name.Equals("txtMobile")) { txtEmail.Focus(); return; } if (a.Name.Equals("txtEmail")) { txtRemark.Focus(); return; } if (a.Name.Equals("txtRemark")) { txtPid.Focus(); return; } if (a.Name.Equals("txtPid")) { txtLogo.Focus(); return; } if (a.Name.Equals("txtLogo")) { btnSave.Focus(); return; } } //a.BackColor = Color.DarkCyan;txtZipCode //a.Font = new Font(ff, FontStyle.Bold); }
private void setGrfCopBnk(String copid) { grfCopBnk.Clear(); DataTable dt = new DataTable(); dt = xC.iniDB.copbDB.selectBankByCop(copid); grfCopBnk.Cols.Count = 7; grfCopBnk.Rows.Count = dt.Rows.Count + 2; C1TextBox txt = new C1TextBox(); txt.DataType = txtCopCode.DataType; C1ComboBox cbo = new C1ComboBox(); xC.iniDB.bnkDB.setC1CboItem(cbo); grfCopBnk.Cols[colBBnkNameT].Editor = cbo; grfCopBnk.Cols[colBBnkBranch].Editor = txt; grfCopBnk.Cols[colBaccnumber].Editor = txt; grfCopBnk.Cols[colBRemark].Editor = txt; grfCopBnk.Cols[colBBnkNameT].Caption = "ธนาคาร"; grfCopBnk.Cols[colBBnkBranch].Caption = "สาขา"; grfCopBnk.Cols[colBaccnumber].Caption = "เลขที่บัญชี"; grfCopBnk.Cols[colBRemark].Caption = "หมยาเหตุ"; grfCopBnk.Cols[colBID].Width = 60; grfCopBnk.Cols[colBBnkNameT].Width = 150; grfCopBnk.Cols[colBBnkBranch].Width = 150; grfCopBnk.Cols[colBaccnumber].Width = 100; grfCopBnk.Cols[colBRemark].Width = 200; //grfCopBnk.DataSource = dt; Color color = ColorTranslator.FromHtml(xC.iniC.grfRowColor); for (int i = 0; i < dt.Rows.Count; i++) { grfCopBnk[i + 1, 0] = i + 1; if (i % 2 == 0) { grfCopBnk.Rows[i + 1].StyleNew.BackColor = color; } grfCopBnk[i + 1, colBID] = dt.Rows[i][xC.iniDB.copbDB.copB.comp_bank_id].ToString(); grfCopBnk[i + 1, colBBnkNameT] = dt.Rows[i][xC.iniDB.copbDB.copB.comp_bank_name_t].ToString(); grfCopBnk[i + 1, colBBnkBranch] = dt.Rows[i][xC.iniDB.copbDB.copB.comp_bank_branch].ToString(); grfCopBnk[i + 1, colBaccnumber] = dt.Rows[i][xC.iniDB.copbDB.copB.acc_number].ToString(); grfCopBnk[i + 1, colBRemark] = dt.Rows[i][xC.iniDB.copbDB.copB.remark].ToString(); grfCopBnk[i + 1, colBedit] = ""; } grfCopBnk.Cols[colBID].Visible = false; grfCopBnk.Cols[colBedit].Visible = false; }
/// <summary> /// テキストボックスを設定 /// </summary> /// <param name="lo"></param> /// <param name="vo"></param> /// <param name="itemY"></param> /// <param name="r"></param> protected void SetCtlTypeString(int lo, int vo, int itemY, DataRow r) { //文字列 SetLabel(lo, itemY, _labelSize, BorderStyle.FixedSingle, r[CommonConsts.db_name].ToString() + "Label", r[CommonConsts.col_name].ToString()); C1TextBox tb = new C1TextBox(); this.MainPanel.Controls.Add(tb); tb.Location = new Point(vo, itemY); tb.Name = r[CommonConsts.db_name].ToString(); tb.Size = _ctlSize; tb.ShowFocusRectangle = true; //値設定 tb.Value = r[CommonConsts.value1].ToString(); }
private void setGrfReq() { //grfDept.Rows.Count = 7; grfReq.Clear(); DataTable dt = new DataTable(); grfReq.DataSource = ic.ivfDB.lbReqDB.selectByReq1(); //grfExpn.Rows.Count = dt.Rows.Count + 1; //grfCu.Rows.Count = 41; //grfCu.Cols.Count = 4; C1TextBox txt = new C1TextBox(); //C1ComboBox cboproce = new C1ComboBox(); //ic.ivfDB.itmDB.setCboItem(cboproce); grfReq.Cols[colRqReqNum].Editor = txt; grfReq.Cols[colRqHn].Editor = txt; grfReq.Cols[colRqVn].Editor = txt; grfReq.Cols[colRqName].Editor = txt; grfReq.Cols[colRqHn].Width = 120; grfReq.Cols[colRqVn].Width = 120; grfReq.Cols[colRqName].Width = 280; grfReq.Cols[colRqDate].Width = 100; //grfReq.Cols[colCuTime].Width = 80; grfReq.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfReq.Cols[colRqReqNum].Caption = "req number"; grfReq.Cols[colRqHn].Caption = "HN"; grfReq.Cols[colRqVn].Caption = "VN"; grfReq.Cols[colRqName].Caption = "Name"; grfReq.Cols[colRqDate].Caption = "Date"; grfReq.Cols[colRqRemark].Caption = "Remark"; Color color = ColorTranslator.FromHtml(ic.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 = 1; i <= grfReq.Rows.Count - 1; i++) { grfReq[i, 0] = i; } grfReq.Cols[colRqId].Visible = false; }
private void setGrfLabItem() { //grfDept.Rows.Count = 7; DataTable dt = new DataTable(); dt = ic.ivfDB.oLabiDB.selectAll1(); grfLab.DataSource = null; grfLab.Cols.Count = 5; grfLab.Rows.Count = 1; C1TextBox txt = new C1TextBox(); grfLab.Cols[colName].Editor = txt; grfLab.Cols[colID].Width = 60; //grfPosi.Cols[colCode].Width = 80; grfLab.Cols[colName].Width = 300; grfLab.Cols[colSubName].Width = 300; grfLab.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfLab.Cols[colSubName].Caption = "Group"; grfLab.Cols[colName].Caption = "ชื่อประเภทเอกสารย่อย"; grfLab.Cols[colPrice].Caption = "ราคา"; //grfDept.Cols[coledit].Visible = false; //CellRange rg = grfPosi.GetCellRange(2, colE); for (int i = 0; i < dt.Rows.Count; i++) { Row row = grfLab.Rows.Add(); row[colID] = dt.Rows[i][ic.ivfDB.oLabiDB.labI.LID].ToString(); row[colName] = dt.Rows[i][ic.ivfDB.oLabiDB.labI.LName].ToString(); row[colSubName] = dt.Rows[i]["LGName"].ToString(); row[colPrice] = dt.Rows[i][ic.ivfDB.oLabiDB.labI.Price].ToString(); row[0] = (i + 1); if (i % 2 != 0) { grfLab.Rows[i].StyleNew.BackColor = ColorTranslator.FromHtml(ic.iniC.grfRowColor); } } grfLab.Cols[colID].Visible = false; //grfPosi.Cols[colE].Visible = false; //grfPosi.Cols[colS].Visible = false; }
private void setGrfFMCode() { //grfDept.Rows.Count = 7; DataTable dt = new DataTable(); dt = bc.bcDB.dfmDB.selectAll(); grfFMCode.DataSource = null; grfFMCode.Cols.Count = 4; grfFMCode.Rows.Count = 1; C1TextBox txt = new C1TextBox(); //grfPosi.Cols[colName].Editor = txt; grfFMCode.Cols[colID].Width = 60; //grfPosi.Cols[colCode].Width = 80; grfFMCode.Cols[colCode].Width = 300; grfFMCode.Cols[colSubName].Width = 300; grfFMCode.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; //grfPosi.Cols[colCode].Caption = "รหัส"; grfFMCode.Cols[colCode].Caption = "FM-CODE"; //grfPosi.Cols[colRemark].Caption = "หมายเหตุ"; //grfDept.Cols[coledit].Visible = false; //CellRange rg = grfPosi.GetCellRange(2, colE); for (int i = 0; i < dt.Rows.Count; i++) { Row row = grfFMCode.Rows.Add(); row[colID] = dt.Rows[i]["fm_id"].ToString(); row[colCode] = dt.Rows[i]["fm_code"].ToString(); row[colSubName] = dt.Rows[i]["doc_group_sub_name"].ToString(); row[0] = (i + 1); if (i % 2 == 0) { grfFMCode.Rows[i].StyleNew.BackColor = ColorTranslator.FromHtml(bc.iniC.grfRowColor); } } grfFMCode.Cols[colID].Visible = false; grfFMCode.Cols[colSubName].AllowEditing = false; grfFMCode.Cols[colCode].AllowEditing = false; }
private void setGrfTaxView() { CellStyle cs = grfTaxView.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; grfTaxView.Cols.Count = 10; grfTaxView.Rows.Count = 1; grfTaxView.Cols[colTItemNameT].Editor = txt; grfTaxView.Cols[colTtaxdate].Editor = txt; grfTaxView.Cols[colTAmt].Editor = txt; grfTaxView.Cols[colTtaxamt].Editor = txt; grfTaxView.Cols[colTItemNameT].Width = 240; grfTaxView.Cols[colTtaxdate].Width = 100; grfTaxView.Cols[colTAmt].Width = 100; grfTaxView.Cols[colTtaxamt].Width = 100; grfTaxView.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfTaxView.Cols[colTItemNameT].Caption = "รายการ"; grfTaxView.Cols[colTtaxdate].Caption = "วันที่จ่ายเงิน"; grfTaxView.Cols[colTAmt].Caption = "ยอดเงินที่จ่าย"; grfTaxView.Cols[colTtaxamt].Caption = "ภาษีหัก ณ ที่จ่าย"; grfTaxView.Cols[colTID].Visible = false; grfTaxView.Cols[colTitemid].Visible = false; grfTaxView.Cols[colTbtaxid].Visible = false; grfTaxView.Cols[colTbtaxnamet].Visible = false; grfTaxView.Cols[colTftaxid].Visible = false; }
private void textBox_Enter(object sender, EventArgs e) { if (sender is C1TextBox) { C1TextBox a = (C1TextBox)sender; a.BackColor = ic.cTxtFocus; a.Font = new Font(ff, FontStyle.Bold); } else if (sender is ComboBox) { ComboBox a = (ComboBox)sender; a.BackColor = ic.cTxtFocus; a.Font = new Font(ff, FontStyle.Bold); } //a.ForeColor = Color.Black; }
private void setGrfPosi() { //grfDept.Rows.Count = 7; DataTable dt = new DataTable(); dt = ic.ivfDB.dgsDB.selectAll(); grfPosi.DataSource = null; grfPosi.Cols.Count = 3; grfPosi.Rows.Count = 1; C1TextBox txt = new C1TextBox(); grfPosi.Cols[colName].Editor = txt; grfPosi.Cols[colID].Width = 60; //grfPosi.Cols[colCode].Width = 80; grfPosi.Cols[colName].Width = 300; grfPosi.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; //grfPosi.Cols[colCode].Caption = "รหัส"; grfPosi.Cols[colName].Caption = "ชื่อประเภทเอกสาร"; //grfPosi.Cols[colRemark].Caption = "หมายเหตุ"; //grfDept.Cols[coledit].Visible = false; //CellRange rg = grfPosi.GetCellRange(2, colE); for (int i = 0; i < dt.Rows.Count; i++) { Row row = grfPosi.Rows.Add(); row[colID] = dt.Rows[i]["doc_group_id"].ToString(); row[colName] = dt.Rows[i]["doc_group_name"].ToString(); row[0] = (i + 1); if (i % 2 == 0) { grfPosi.Rows[i].StyleNew.BackColor = ColorTranslator.FromHtml(ic.iniC.grfRowColor); } } grfPosi.Cols[colID].Visible = false; //grfPosi.Cols[colE].Visible = false; //grfPosi.Cols[colS].Visible = false; }
private void setGrfDeptH() { grfExpnD.Clear(); //if (txtID.Text.Equals("")) return; grfExpnD.DataSource = xC.iniDB.itmDB.selectAll1(chkCash.Checked ? "1" : chkCheque.Checked ? "2" : chkAll.Checked ? "" : chkItmServe.Checked ? "9" : ""); C1TextBox txt = new C1TextBox(); txt.DataType = txtID.DataType; grfExpnD.Cols[colID].Editor = txt; grfExpnD.Cols[colCode].Editor = txt; grfExpnD.Cols[colNameT].Editor = txt; grfExpnD.Cols[colPrice1].Editor = txt; grfExpnD.Cols[colPrice2].Editor = txt; grfExpnD.Cols[colPrice3].Editor = txt; grfExpnD.Cols[colTypeSub].Editor = txt; grfExpnD.Cols[colCode].Width = 80; grfExpnD.Cols[colNameT].Width = 200; grfExpnD.Cols[colPrice1].Width = 80; grfExpnD.Cols[colPrice2].Width = 80; grfExpnD.Cols[colPrice3].Width = 80; grfExpnD.Cols[colTypeSub].Width = 120; grfExpnD.ShowCursor = true; grfExpnD.Cols[colCode].Caption = "รหัส"; grfExpnD.Cols[colNameT].Caption = "ชื่อ"; grfExpnD.Cols[colPrice1].Caption = "ราคา1"; grfExpnD.Cols[colPrice2].Caption = "ราคา2"; grfExpnD.Cols[colPrice3].Caption = "ราคา3"; grfExpnD.Cols[colTypeSub].Caption = "ประเภทย่อย"; Color color = ColorTranslator.FromHtml(xC.iniC.grfRowColor); for (int i = 1; i < grfExpnD.Rows.Count; i++) { grfExpnD[i, 0] = i; if (i % 2 == 0) { grfExpnD.Rows[i].StyleNew.BackColor = color; } } grfExpnD.Cols[colID].Visible = false; }
private void setGrfPttHn() { //grfDept.Rows.Count = 7; grfPtt.Clear(); grfPtt.DataSource = null; grfPtt.Cols.Count = 8; grfPtt.Rows.Count = 1; try { String startDate = "", endDate = ""; DateTime dtStart = new DateTime(); DateTime dtEnd = new DateTime(); dtStart = (DateTime)txtStartDate.Value; dtEnd = (DateTime)txtEndDate.Value; DataTable dt = new DataTable(); startDate = dtStart.Year + "-" + dtStart.ToString("MM-dd"); endDate = dtEnd.Year + "-" + dtEnd.ToString("MM-dd"); dt = ic.ivfDB.oJpxDB.selectByDate(startDate, endDate, txtSearch.Text); //grfExpn.Rows.Count = dt.Rows.Count + 1; //grfCu.Rows.Count = 41; //grfCu.Cols.Count = 4; C1TextBox txt = new C1TextBox(); //C1ComboBox cboproce = new C1ComboBox(); //ic.ivfDB.itmDB.setCboItem(cboproce); grfPtt.Cols[colVN].Editor = txt; grfPtt.Cols[colHn].Editor = txt; grfPtt.Cols[colName].Editor = txt; grfPtt.Cols[colVsDate].Editor = txt; grfPtt.Cols[colStatus].Editor = txt; grfPtt.Cols[colVN].Width = 120; grfPtt.Cols[colHn].Width = 120; grfPtt.Cols[colName].Width = 300; grfPtt.Cols[colVsDate].Width = 120; grfPtt.Cols[colStatus].Width = 50; grfPtt.Cols[colStatusNurse].Width = 50; grfPtt.Cols[colStatusCashier].Width = 55; grfPtt.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfPtt.Cols[colVN].Caption = "VN"; grfPtt.Cols[colHn].Caption = "HN"; grfPtt.Cols[colName].Caption = "Name"; grfPtt.Cols[colVsDate].Caption = "Date"; grfPtt.Cols[colStatus].Caption = "Status"; grfPtt.Cols[colStatusNurse].Caption = "Nurse"; grfPtt.Cols[colStatusCashier].Caption = "Cashier"; menuGw = new ContextMenu(); menuGw.MenuItems.Add("&พิมพ์ Sticker", new EventHandler(ContextMenu_edit)); grfPtt.ContextMenu = menuGw; Color color = ColorTranslator.FromHtml(ic.iniC.grfRowColor); //CellRange rg1 = grfBank.GetCellRange(1, colE, grfBank.Rows.Count, colE); //rg1.Style = grfBank.Styles["date"]; //grfCu.Cols[colID].Visible = false; int i = 1; foreach (DataRow row in dt.Rows) { Row row1 = grfPtt.Rows.Add(); row1[0] = i; row1[colVN] = row["VN"].ToString(); row1[colHn] = row["PIDS"].ToString(); row1[colName] = row["name"].ToString(); row1[colVsDate] = ic.datetoShow(row["Date"].ToString()); row1[colStatus] = row["Status"].ToString(); row1[colStatusNurse] = row["status_nurse"] != null ? row["status_nurse"].ToString() : ""; row1[colStatusCashier] = row["status_cashier"] != null ? row["status_cashier"].ToString() : ""; if (i % 2 == 0) { grfPtt.Rows[i].StyleNew.BackColor = color; } i++; } //grfPtt.Cols[colVN].Visible = false; theme1.SetTheme(grfPtt, ic.theme); } catch (Exception ex) { MessageBox.Show("" + ex.Message, "Error"); } }
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 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 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 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 setConponent() { int gapLine = 30, gapX = 20, gapY = 20; Size size = new Size(); initGrfLeft(); initGrfImg(); lbMlFmCode = new Label(); lbMlFmCode.AutoSize = true; lbMlFmCode.BorderStyle = System.Windows.Forms.BorderStyle.None; lbMlFmCode.Font = fEdit; lbMlFmCode.ForeColor = System.Drawing.SystemColors.ControlText; lbMlFmCode.Location = new System.Drawing.Point(gapX, gapY); lbMlFmCode.Text = "Fm Code:"; txtMlFmCode = new C1TextBox(); txtMlFmCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; txtMlFmCode.Font = fEdit; txtMlFmCode.Width = 200; size = bc.MeasureString(lbMlFmCode); txtMlFmCode.Location = new System.Drawing.Point(lbMlFmCode.Location.X + size.Width + 15, lbMlFmCode.Location.Y); txtMlFmCode.Name = "txtMlFmCode"; txtMlFmCode.ReadOnly = true; gapY += gapLine; lbMlFmCodeNew = new Label(); lbMlFmCodeNew.AutoSize = true; lbMlFmCodeNew.BorderStyle = System.Windows.Forms.BorderStyle.None; lbMlFmCodeNew.Font = fEdit; lbMlFmCodeNew.ForeColor = System.Drawing.SystemColors.ControlText; lbMlFmCodeNew.Location = new System.Drawing.Point(gapX, gapY); lbMlFmCodeNew.Text = "Fm Code:"; txtMlFmCodeNew = new C1TextBox(); txtMlFmCodeNew.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; txtMlFmCodeNew.Width = 200; txtMlFmCodeNew.Font = fEdit; size = bc.MeasureString(lbMlFmCodeNew); txtMlFmCodeNew.Location = new System.Drawing.Point(lbMlFmCodeNew.Location.X + size.Width + 15, lbMlFmCodeNew.Location.Y); txtMlFmCodeNew.Name = "txtMlFmCodeNew"; btnUpdate = new C1Button(); btnUpdate.Name = "btnUpdate"; btnUpdate.Text = "Update Fm Code"; btnUpdate.Font = this.fEdit; size = new Size(120, 40); btnUpdate.Size = size; btnUpdate.Location = new Point(txtMlFmCodeNew.Location.X + txtMlFmCodeNew.Width + 40, lbMlFmCodeNew.Location.Y); //btnPrn.Click += BtnPrn_Click; btnFmCode = new C1Button(); btnFmCode.Name = "btnFmCode"; btnFmCode.Text = "Fm Code"; btnFmCode.Font = this.fEdit; size = new Size(120, 40); btnFmCode.Size = size; btnFmCode.Location = new Point(btnUpdate.Location.X + btnUpdate.Width + 40, lbMlFmCodeNew.Location.Y); gapY += gapLine; chkLimit = new C1CheckBox(); chkLimit.Text = "Limit 40 "; chkLimit.Name = "chkLimit"; chkLimit.Location = new Point(gapX, gapY); chkLimit.Checked = true; //pnRightTop.Controls.Add(btnUpdate); pnRightTop.Controls.Add(lbMlFmCode); pnRightTop.Controls.Add(txtMlFmCode); pnRightTop.Controls.Add(lbMlFmCodeNew); pnRightTop.Controls.Add(txtMlFmCodeNew); pnRightTop.Controls.Add(btnUpdate); pnRightTop.Controls.Add(chkLimit); pnRightTop.Controls.Add(btnFmCode); }
private void setGrf() { grfVs.Clear(); grfVs.Rows.Count = 1; grfVs.Cols.Count = 8; C1TextBox text = new C1TextBox(); grfVs.Cols[colVsVsDate].Editor = text; grfVs.Cols[colVsVn].Editor = text; grfVs.Cols[colVsDept].Editor = text; grfVs.Cols[colVsPreno].Editor = text; grfVs.Cols[colVsVsDate].Width = 100; grfVs.Cols[colVsVn].Width = 80; grfVs.Cols[colVsDept].Width = 100; grfVs.Cols[colVsPreno].Width = 100; grfVs.Cols[colVsStatus].Width = 60; grfVs.ShowCursor = true; //grfVs.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.RestrictRows; grfVs.Cols[colVsVsDate].Caption = "Visit Date"; grfVs.Cols[colVsVn].Caption = "VN"; grfVs.Cols[colVsDept].Caption = "แผนก"; grfVs.Cols[colVsPreno].Caption = ""; grfVs.Cols[colVsPreno].Visible = false; grfVs.Cols[colVsVn].Visible = false; grfVs.Cols[colVsAn].Visible = false; grfVs.Cols[colVsAndate].Visible = false; grfVs.Rows[0].Visible = false; grfVs.Cols[0].Visible = false; grfVs.Cols[colVsVsDate].AllowEditing = false; grfVs.Cols[colVsVn].AllowEditing = false; grfVs.Cols[colVsDept].AllowEditing = false; grfVs.Cols[colVsPreno].AllowEditing = false; DataTable dt = new DataTable(); MessageBox.Show("hn " + hn, ""); dt = bc.bcDB.vsDB.selectVisitByHn3(txtHn.Text); int i = 1, j = 1, row = grfVs.Rows.Count; //txtVN.Value = dt.Rows.Count; //txtName.Value = ""; //txt.Value = ""; foreach (DataRow row1 in dt.Rows) { Row rowa = grfVs.Rows.Add(); String status = "", vn = ""; status = row1["MNC_PAT_FLAG"] != null ? row1["MNC_PAT_FLAG"].ToString().Equals("O") ? "OPD" : "IPD" : "-"; vn = row1["MNC_VN_NO"].ToString() + "/" + row1["MNC_VN_SEQ"].ToString() + "(" + row1["MNC_VN_SUM"].ToString() + ")"; rowa[colVsVsDate] = bc.datetoShow(row1["mnc_date"]); rowa[colVsVn] = vn; rowa[colVsStatus] = status; rowa[colVsPreno] = row1["mnc_pre_no"].ToString(); rowa[colVsDept] = row1["MNC_SHIF_MEMO"].ToString(); rowa[colVsAn] = row1["mnc_an_no"].ToString() + "/" + row1["mnc_an_yr"].ToString(); rowa[colVsAndate] = bc.datetoShow(row1["mnc_ad_date"].ToString()); } //ContextMenu menuGw = new ContextMenu(); //menuGw.MenuItems.Add("&ยกเลิก รูปภาพนี้", new EventHandler(ContextMenu_Void)); //menuGw.MenuItems.Add("&Update ข้อมูล", new EventHandler(ContextMenu_Update)); //foreach (DocGroupScan dgs in bc.bcDB.dgsDB.lDgs) //{ // menuGw.MenuItems.Add("&เลือกประเภทเอกสาร และUpload Image [" + dgs.doc_group_name + "]", new EventHandler(ContextMenu_upload)); //} //grfVs.ContextMenu = menuGw; //grfVs.Cols[colVsVsDate].Visible = false; //grfVs.Cols[colImagePath].Visible = false; //row1[colVSE2] = row[ic.ivfDB.pApmDB.pApm.e2].ToString().Equals("1") ? imgCorr : imgTran; //grfVs.AutoSizeCols(); //grfVs.AutoSizeRows(); //grfVs.Refresh(); //theme1.SetTheme(grfVs, "ExpressionDark"); }
private void setGrfView() { //grfDept.Rows.Count = 7; //DataTable dtP = new DataTable(); DataTable dtC = new DataTable(); //dtP = xC.xtDB.rspDB.selectAll(); dtC = xC.accDB.rscDB.selectAll(); grfView.Cols.Count = 5; grfView.Rows.Count = 1; C1TextBox txt = new C1TextBox(); grfView.Cols[colDate].Editor = txt; grfView.Cols[colType].Editor = txt; grfView.Cols[colAmt].Editor = txt; grfView.Cols[colDesc].Editor = txt; grfView.Cols[colDate].Width = 150; grfView.Cols[colType].Width = 100; grfView.Cols[colAmt].Width = 100; grfView.Cols[colDesc].Width = 300; //grfView.Cols[colStatus].Width = 80; //grfView.Cols[colStatusPay].Width = 80; grfView.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfView.Cols[colDate].Caption = "วันที่"; grfView.Cols[colType].Caption = "ประเภท"; grfView.Cols[colAmt].Caption = "จำนวนเงิน"; grfView.Cols[colDesc].Caption = "รายการ"; Color color = ColorTranslator.FromHtml(xC.iniC.grfRowColor); for (int i = 0; i < dtC.Rows.Count; i++) { Row row = grfView.Rows.Add(); row[0] = (i + 1); if (i % 2 == 0) { row.StyleNew.BackColor = color; } String date = ""; date = dtC.Rows[i][xC.accDB.rscDB.rsc.date_create].ToString(); row[colDate] = date; if (!dtC.Rows[i][xC.accDB.rscDB.rsc.expenses_pay_detail_id].ToString().Equals("0")) { row[colType] = "จ่าย"; } else { row[colType] = "เบิกเงิน"; } row[colAmt] = dtC.Rows[i][xC.accDB.rscDB.rsc.amount].ToString(); row[colDesc] = dtC.Rows[i][xC.accDB.rscDB.rsc.desc1].ToString(); } //CellRange rg1 = grfBank.GetCellRange(1, colE, grfBank.Rows.Count, colE); //rg1.Style = grfBank.Styles["date"]; //grfView.Cols[colID].Visible = false; }
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 setGrfDiag(String search) { //grfDept.Rows.Count = 7; grfDiag.Clear(); DataTable dt = new DataTable(); if (search.Equals("")) { //String date = System.DateTime.Now.Year + "-" + System.DateTime.Now.ToString("MM-dd"); dt = ic.ivfDB.ovsDB.selectByStatusNurseDiag(); } else { //grfPtt.DataSource = ic.ivfDB.vsOldDB.selectCurrentVisit(search); } //grfExpn.Rows.Count = dt.Rows.Count + 1; grfDiag.Rows.Count = dt.Rows.Count + 1; grfDiag.Cols.Count = 9; C1TextBox txt = new C1TextBox(); //C1ComboBox cboproce = new C1ComboBox(); //ic.ivfDB.itmDB.setCboItem(cboproce); grfDiag.Cols[colPttHn].Editor = txt; grfDiag.Cols[colPttName].Editor = txt; grfDiag.Cols[colVsDate].Editor = txt; grfDiag.Cols[colVNshow].Width = 120; grfDiag.Cols[colPttHn].Width = 120; grfDiag.Cols[colPttName].Width = 300; grfDiag.Cols[colVsDate].Width = 100; grfDiag.Cols[colVsTime].Width = 80; grfDiag.Cols[colVsEtime].Width = 80; grfDiag.Cols[colStatus].Width = 200; grfDiag.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfDiag.Cols[colVNshow].Caption = "VN"; grfDiag.Cols[colPttHn].Caption = "HN"; grfDiag.Cols[colPttName].Caption = "Name"; grfDiag.Cols[colVsDate].Caption = "Date"; grfDiag.Cols[colVsTime].Caption = "Time visit"; grfDiag.Cols[colVsEtime].Caption = "Time finish"; grfDiag.Cols[colStatus].Caption = "Status"; ContextMenu menuGw = new ContextMenu(); grfDiag.ContextMenu = menuGw; Color color = ColorTranslator.FromHtml(ic.iniC.grfRowColor); //CellRange rg1 = grfBank.GetCellRange(1, colE, grfBank.Rows.Count, colE); //rg1.Style = grfBank.Styles["date"]; //grfCu.Cols[colID].Visible = false; int i = 1; foreach (DataRow row in dt.Rows) { grfDiag[i, 0] = i; grfDiag[i, colID] = row["id"].ToString(); grfDiag[i, colVNshow] = row["VN"].ToString(); grfDiag[i, colPttHn] = row["PIDS"].ToString(); grfDiag[i, colPttName] = row["PName"].ToString(); grfDiag[i, colVsDate] = ic.datetoShow(row["VDate"]); grfDiag[i, colVsTime] = row["VStartTime"].ToString(); grfDiag[i, colVsEtime] = row["VEndTime"].ToString(); grfDiag[i, colStatus] = row["VName"].ToString(); //if (i % 2 == 0) // grfPtt.Rows[i].StyleNew.BackColor = color; i++; } grfDiag.Cols[colID].Visible = false; //theme1.SetTheme(grfDiag, ic.theme); }
private void setGrfQue() { //grfDept.Rows.Count = 7; grfQue.Clear(); DataTable dt1 = new DataTable(); DataTable dt = new DataTable(); if (txtSearch.Text.Equals("")) { String date = ""; DateTime dt11 = new DateTime(); if (DateTime.TryParse(txtDateStart.Text, out dt11)) { //dt11 = dt11.AddDays(-1); date = dt11.Year + "-" + dt11.ToString("MM-dd"); //dt = ic.ivfDB.ovsDB.selectByDate(date); } dt = ic.ivfDB.ovsDB.selectByReceptionSendDoctor(ic.user.doctor_id_old); } else { //grfPtt.DataSource = ic.ivfDB.vsOldDB.selectCurrentVisit(search); } //grfExpn.Rows.Count = dt.Rows.Count + 1; grfQue.Rows.Count = dt.Rows.Count + 1; grfQue.Cols.Count = 11; C1TextBox txt = new C1TextBox(); //C1ComboBox cboproce = new C1ComboBox(); //ic.ivfDB.itmDB.setCboItem(cboproce); grfQue.Cols[colPttHn].Editor = txt; grfQue.Cols[colPttName].Editor = txt; grfQue.Cols[colVsDate].Editor = txt; grfQue.Cols[colVNshow].Width = 80; grfQue.Cols[colPttHn].Width = 120; grfQue.Cols[colPttName].Width = 300; grfQue.Cols[colVsDate].Width = 100; grfQue.Cols[colVsTime].Width = 80; grfQue.Cols[colVsEtime].Width = 80; grfQue.Cols[colStatus].Width = 200; grfQue.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfQue.Cols[colVNshow].Caption = "VN"; grfQue.Cols[colPttHn].Caption = "HN"; grfQue.Cols[colPttName].Caption = "Name"; grfQue.Cols[colVsDate].Caption = "Date"; grfQue.Cols[colVsTime].Caption = "Time visit"; grfQue.Cols[colVsEtime].Caption = "Time finish"; grfQue.Cols[colStatus].Caption = "Status"; ContextMenu menuGw = new ContextMenu(); //menuGw.MenuItems.Add("&receive operation", new EventHandler(ContextMenu_Apm)); grfQue.ContextMenu = menuGw; Color color = ColorTranslator.FromHtml(ic.iniC.grfRowColor); //CellRange rg1 = grfBank.GetCellRange(1, colE, grfBank.Rows.Count, colE); //rg1.Style = grfBank.Styles["date"]; //grfCu.Cols[colID].Visible = false; int i = 1; foreach (DataRow row in dt.Rows) { grfQue[i, 0] = i; grfQue[i, colID] = row["id"].ToString(); grfQue[i, colVNshow] = ic.showVN(row["VN"].ToString()); grfQue[i, colVn] = row["VN"].ToString(); grfQue[i, colPttHn] = row["PIDS"].ToString(); grfQue[i, colPttName] = row["PName"].ToString(); grfQue[i, colVsDate] = ic.datetoShow(row["VDate"]); grfQue[i, colVsTime] = row["VStartTime"].ToString(); grfQue[i, colVsEtime] = row["VEndTime"].ToString(); grfQue[i, colStatus] = row["VName"].ToString(); grfQue[i, colPttId] = row["PID"].ToString(); if (!row[ic.ivfDB.ovsDB.vsold.form_a_id].ToString().Equals("0")) { CellNote note = new CellNote("ส่ง Lab Request Foam A"); CellRange rg = grfQue.GetCellRange(i, colVNshow); rg.UserData = note; } //if (i % 2 == 0) // grfPtt.Rows[i].StyleNew.BackColor = color; i++; } CellNoteManager mgr = new CellNoteManager(grfQue); grfQue.Cols[colID].Visible = false; grfQue.Cols[colVn].Visible = false; grfQue.Cols[colVNshow].AllowEditing = false; grfQue.Cols[colPttHn].AllowEditing = false; grfQue.Cols[colPttName].AllowEditing = false; grfQue.Cols[colVsDate].AllowEditing = false; //theme1.SetTheme(grfQue, ic.theme); }
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(); lbDateEnd = new Label(); txtDateEnd = new C1DateEdit(); lbtxtPaidType = new Label(); txtPaidType = new C1TextBox(); btnImportDfSelect = new C1Button(); btnImportDfGen = new C1Button(); lbLoading = new Label(); lbLoading.Font = fEdit5B; lbLoading.BackColor = Color.WhiteSmoke; lbLoading.ForeColor = Color.Black; lbLoading.AutoSize = false; lbLoading.Size = new Size(300, 60); bc.setControlLabel(ref lbDateStart, fEdit, "วันที่เริ่มต้น :", "lbDateStart", gapX, gapY); size = bc.MeasureString(lbDateStart); bc.setControlC1DateTimeEdit(ref txtDateStart, "txtDateStart", lbDateStart.Location.X + size.Width + 5, gapY); size = bc.MeasureString(lbDateStart); //bc.setControlC1DateTimeEdit(ref txtDateStart, "txtDateStart", lbDateStart.Location.X + size.Width + 5, gapY); bc.setControlLabel(ref lbDateEnd, fEdit, "วันที่สิ้นสุด :", "lbDateEnd", txtDateStart.Location.X + txtDateStart.Width + 15, gapY); size = bc.MeasureString(lbDateEnd); bc.setControlC1DateTimeEdit(ref txtDateEnd, "txtDateEnd", lbDateEnd.Location.X + size.Width + 5, gapY); bc.setControlLabel(ref lbtxtPaidType, fEdit, "สิทธิ (xx,...) :", "lbtxtPaidType", txtDateEnd.Location.X + txtDateEnd.Width + 15, gapY); size = bc.MeasureString(lbtxtPaidType); bc.setControlC1TextBox(ref txtPaidType, fEdit, "txtPaidType", 120, lbtxtPaidType.Location.X + size.Width + 5, gapY); bc.setControlC1Button(ref btnImportDfSelect, fEdit, "ดึงข้อมูล", "btnSelect", txtPaidType.Location.X + txtPaidType.Width + 20, gapY); btnImportDfSelect.Width = 70; bc.setControlC1Button(ref btnImportDfGen, fEdit, "gen Text", "btnGen", btnImportDfSelect.Location.X + btnImportDfSelect.Width + 20, gapY); btnImportDfGen.Width = 80; tabImportDf.Controls.Add(grfSelect); theme1.SetTheme(grfSelect, "Office2010Red"); tabImportDf.Controls.Add(lbDateStart); tabImportDf.Controls.Add(txtDateStart); tabImportDf.Controls.Add(lbDateEnd); tabImportDf.Controls.Add(txtDateEnd); tabImportDf.Controls.Add(lbtxtPaidType); tabImportDf.Controls.Add(txtPaidType); tabImportDf.Controls.Add(btnImportDfSelect); tabImportDf.Controls.Add(btnImportDfGen); tcMain.Controls.Add(tabImportDf); this.Controls.Add(lbLoading); this.Controls.Add(tcMain); }
private void setControlComponent() { //new LogWriter("d", "FrmDoctorView setControlComponent 00 "); int gapLine = 10, gapX = 20; Size size = new Size(); int scrW = Screen.PrimaryScreen.Bounds.Width; lbDtrName = new Label(); lbDtrName.Text = "..."; lbDtrName.Font = fEditBig; lbDtrName.Location = new System.Drawing.Point(gapX, 5); lbDtrName.AutoSize = true; lbDtrName.Name = "lbDtrName"; lbTxtPttHn = new Label(); lbTxtPttHn.Text = "HN :"; lbTxtPttHn.Font = fEditBig; size = bc.MeasureString(lbTxtPttHn); lbTxtPttHn.Location = new System.Drawing.Point(((scrW / 2) - size.Width) - 60, lbDtrName.Location.Y); lbTxtPttHn.AutoSize = true; lbTxtPttHn.Name = "lbTxtPttHn"; //lbDtrName.SuspendLayout(); //lbTxtPttHn.SuspendLayout(); txtPttHn = new C1TextBox(); txtPttHn.Font = fEditBig; txtPttHn.Location = new System.Drawing.Point(lbTxtPttHn.Location.X + size.Width + 5, lbTxtPttHn.Location.Y); txtPttHn.Size = new Size(120, 20); btnHnSearch = new C1Button(); btnHnSearch.Name = "btnHnSearch"; btnHnSearch.Text = "..."; btnHnSearch.Font = fEdit; //size = bc.MeasureString(btnHnSearch); btnHnSearch.Location = new System.Drawing.Point(txtPttHn.Location.X + txtPttHn.Width + 5, lbTxtPttHn.Location.Y); btnHnSearch.Size = new Size(30, lbTxtPttHn.Height); btnHnSearch.Font = fEdit; //lbPttName = new Label(); //lbPttName.Text = "..."; //lbPttName.Font = fEditBig; //lbPttName.Location = new System.Drawing.Point(btnHnSearch.Location.X + btnHnSearch.Width + 10, lbTxtPttHn.Location.Y); //lbPttName.AutoSize = true; //lbPttName.Name = "lbPttName"; txtDate = new C1DateEdit(); txtDate.AllowSpinLoop = false; txtDate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; txtDate.Calendar.Font = new System.Drawing.Font("Tahoma", 8F); txtDate.Calendar.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; txtDate.Calendar.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; txtDate.CurrentTimeZone = false; txtDate.DisplayFormat.CustomFormat = "dd/MM/yyyy"; txtDate.DisplayFormat.FormatType = FormatTypeEnum.CustomFormat; txtDate.FormatType = C1.Win.C1Input.FormatTypeEnum.CustomFormat; txtDate.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(((((C1.Win.C1Input.FormatInfoInheritFlags.NullText | C1.Win.C1Input.FormatInfoInheritFlags.EmptyAsNull) | C1.Win.C1Input.FormatInfoInheritFlags.TrimStart) | C1.Win.C1Input.FormatInfoInheritFlags.TrimEnd) | C1.Win.C1Input.FormatInfoInheritFlags.CalendarType))); txtDate.EditFormat.CustomFormat = "dd/MM/yyyy"; txtDate.EditFormat.FormatType = C1.Win.C1Input.FormatTypeEnum.CustomFormat; txtDate.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(((((C1.Win.C1Input.FormatInfoInheritFlags.NullText | C1.Win.C1Input.FormatInfoInheritFlags.EmptyAsNull) | C1.Win.C1Input.FormatInfoInheritFlags.TrimStart) | C1.Win.C1Input.FormatInfoInheritFlags.TrimEnd) | C1.Win.C1Input.FormatInfoInheritFlags.CalendarType))); txtDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); txtDate.GMTOffset = System.TimeSpan.Parse("00:00:00"); txtDate.ImagePadding = new System.Windows.Forms.Padding(0); //size = bc.MeasureString(lbtxtDateStart); txtDate.Location = new System.Drawing.Point(scrW - txtDate.Width + 5, lbTxtPttHn.Location.Y); txtDate.Name = "txtDateStart"; txtDate.Size = new System.Drawing.Size(111, 20); txtDate.TabIndex = 12; txtDate.Tag = null; //theme1.SetTheme(this.txtDate, "(default)"); txtDate.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; txtDate.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue; lbTxtDate = new Label(); lbTxtDate.Text = "Date :"; lbTxtDate.Font = fEdit; size = bc.MeasureString(lbTxtDate); lbTxtDate.Location = new System.Drawing.Point(txtDate.Location.X - size.Width - 5, lbTxtPttHn.Location.Y); lbTxtDate.AutoSize = true; lbTxtDate.Name = "lbTxtPttHn"; //new LogWriter("d", "FrmDoctorView setControlComponent End "); }
private void setGrfFinish(String search) { //grfDept.Rows.Count = 7; //grfFinish.Clear(); DataTable dt = new DataTable(); //if (search.Equals("")) //-0020 //{ //-0020 String date = System.DateTime.Now.Year + "-" + System.DateTime.Now.ToString("MM-dd"); //dt = ic.ivfDB.ovsDB.selectByStatusNurseFinish(ic.datetoDB(txtDateStart.Text)); //-0020 dt = ic.ivfDB.vsDB.selectByStatusPhamacyFinish(date); //+0020 //} //-0020 //else //-0020 //{ //-0020 // //grfPtt.DataSource = ic.ivfDB.vsOldDB.selectCurrentVisit(search); // if (txtDateStart.Text.Equals("")) //-0020 // { //-0020 // dt = ic.ivfDB.ovsDB.selectByStatusNurseFinishLike(search); //-0020 // } //-0020 //} //-0020 grfFinish.Rows.Count = 1; grfFinish.Rows.Count = dt.Rows.Count + 1; grfFinish.Cols.Count = 14; C1TextBox txt = new C1TextBox(); //C1ComboBox cboproce = new C1ComboBox(); //ic.ivfDB.itmDB.setCboItem(cboproce); grfFinish.Cols[colPttHn].Editor = txt; grfFinish.Cols[colPttName].Editor = txt; grfFinish.Cols[colVsDate].Editor = txt; grfFinish.Cols[colVNshow].Width = 80; grfFinish.Cols[colPttHn].Width = 120; grfFinish.Cols[colPttName].Width = 300; grfFinish.Cols[colVsDate].Width = 100; grfFinish.Cols[colVsTime].Width = 80; grfFinish.Cols[colVsEtime].Width = 80; grfFinish.Cols[colStatus].Width = 200; grfFinish.ShowCursor = true; //grdFlex.Cols[colID].Caption = "no"; //grfDept.Cols[colCode].Caption = "รหัส"; grfFinish.Cols[colVNshow].Caption = "VN"; grfFinish.Cols[colPttHn].Caption = "HN"; grfFinish.Cols[colPttName].Caption = "Name"; grfFinish.Cols[colVsDate].Caption = "Date"; grfFinish.Cols[colVsTime].Caption = "Time visit"; grfFinish.Cols[colVsEtime].Caption = "Time finish"; grfFinish.Cols[colStatus].Caption = "Status"; ContextMenu menuGw = new ContextMenu(); grfFinish.ContextMenu = menuGw; Color color = ColorTranslator.FromHtml(ic.iniC.grfRowColor); //CellRange rg1 = grfBank.GetCellRange(1, colE, grfBank.Rows.Count, colE); //rg1.Style = grfBank.Styles["date"]; //grfCu.Cols[colID].Visible = false; int i = 1; foreach (DataRow row in dt.Rows) { grfFinish[i, 0] = i; grfFinish[i, colID] = row["id"].ToString(); grfFinish[i, colVNshow] = ic.showVN(row["VN"].ToString()); grfFinish[i, colPttHn] = ic.showHN(row["PIDS"].ToString(), row["patient_year"].ToString()); grfFinish[i, colPttName] = row["PName"].ToString(); grfFinish[i, colVsDate] = ic.datetoShow(row["VDate"]); grfFinish[i, colVsTime] = ic.timetoShow(row["VStartTime"].ToString()); grfFinish[i, colVsEtime] = ic.timetoShow(row["VEndTime"].ToString()); grfFinish[i, colStatus] = row["VName"].ToString(); grfFinish[i, colPttId] = row["PID"].ToString(); grfFinish[i, colVn] = row["VN"].ToString(); if (!row[ic.ivfDB.ovsDB.vsold.form_a_id].ToString().Equals("0")) { CellNote note = new CellNote("ส่ง Lab Request Foam A"); CellRange rg = grfFinish.GetCellRange(i, colVNshow); rg.UserData = note; } //if (i % 2 == 0) // grfPtt.Rows[i].StyleNew.BackColor = color; i++; } CellNoteManager mgr = new CellNoteManager(grfFinish); grfFinish.Cols[colID].Visible = false; grfFinish.Cols[colPttId].Visible = false; grfFinish.Cols[colVn].Visible = false; grfFinish.Cols[colDtr].Visible = false; grfFinish.Cols[colStatusNurse].Visible = false; grfFinish.Cols[colStatusCashier].Visible = false; grfFinish.Cols[colVNshow].AllowEditing = false; grfFinish.Cols[colPttHn].AllowEditing = false; grfFinish.Cols[colPttName].AllowEditing = false; grfFinish.Cols[colVsDate].AllowEditing = false; grfFinish.Cols[colVsTime].AllowEditing = false; grfFinish.Cols[colVsEtime].AllowEditing = false; grfFinish.Cols[colStatus].AllowEditing = false; //theme1.SetTheme(grfFinish, ic.theme); }
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; }