示例#1
0
        void FormIndustry_EventRefreshAfter()
        {
            FormUtility.SaveStateForm(appname, ref FormName);
            this.FieldLinkSetColumnCaption(0, "Төрлийн дугаар");
            this.FieldLinkSetColumnCaption(1, "Класс код", true);
            this.FieldLinkSetColumnCaption(2, "Төрлийн нэр");
            this.FieldLinkSetColumnCaption(3, "Төрлийн англи нэр", true);
            this.FieldLinkSetColumnCaption(4, "Жагсаалтын эрэмбэ");
            appname  = _core.ApplicationName;
            formname = "Parameter." + this.Name;
            FormName = this;
            FormUtility.RestoreStateForm(appname, ref FormName);
            FormUtility.RestoreStateGrid(appname, formname, ref gridView1);
            switch (btn)
            {
            case 0: gridView1.FocusedRowHandle = rowhandle; break;

            case 1: gridView1.FocusedRowHandle = rowhandle - 1; break;
            }
            btn = 0;
        }
示例#2
0
        void CRMProjectType_EventRefreshAfter()
        {
            FormUtility.SaveStateForm(appname, ref FormName);
            this.FieldLinkSetColumnCaption(0, "Төслийн төрлийн дугаар");
            this.FieldLinkSetColumnCaption(1, "Нэр");
            this.FieldLinkSetColumnCaption(2, "Нэр 2");
            this.FieldLinkSetColumnCaption(3, "Жагсаалтын эрэмбэ");

            appname  = _core.ApplicationName;
            formname = "Parameter." + this.Name;
            FormName = this;
            FormUtility.RestoreStateForm(appname, ref FormName);
            FormUtility.RestoreStateGrid(appname, formname, ref gridControl1);
            switch (btn)
            {
            case 0: gridView1.FocusedRowHandle = rowhandle; break;

            case 1: gridView1.FocusedRowHandle = rowhandle - 1; break;
            }
            btn = 0;
        }
示例#3
0
        void FormRebateFormula_EventRefreshAfter()
        {
            FormUtility.SaveStateForm(appname, ref FormName);
            this.FieldLinkSetColumnCaption(0, "ID дугаар");
            this.FieldLinkSetColumnCaption(1, "Төлөв");
            this.FieldLinkSetColumnCaption(2, "Идэвхтэй эхлэх хугацаа");
            this.FieldLinkSetColumnCaption(3, "Идэвхтэй дуусах хугацаа");
            this.FieldLinkSetColumnCaption(4, "SQL функцийн нэр");
            appname = _core.ApplicationName;
            //formname = "Parameter." + this.Name;
            FormName = this;
            FormUtility.RestoreStateForm(appname, ref FormName);
            FormUtility.RestoreStateGrid(appname, "Parameter." + this.Name, ref gridView1);
            switch (btn)
            {
            case 0: gridView1.FocusedRowHandle = rowhandle; break;

            case 1: gridView1.FocusedRowHandle = rowhandle - 1; break;
            }
            btn = 0;
        }
示例#4
0
        /// <summary>
        /// Post to a page.
        /// </summary>
        /// <param name="uri">The URI to post to.</param>
        /// <param name="param">The post params.</param>
        /// <returns>The HTTP response.</returns>
        public static String POSTPage(Uri uri, IDictionary <String, String> param)
        {
            WebRequest req = WebRequest.Create(uri);

            req.ContentType = "application/x-www-form-urlencoded";
            req.Method      = "POST";

            StringBuilder postString = new StringBuilder();

            foreach (String key in param.Keys)
            {
                String value = param[key];
                if (value != null)
                {
                    if (postString.Length != 0)
                    {
                        postString.Append('&');
                    }
                    postString.Append(key);
                    postString.Append('=');
                    postString.Append(FormUtility.Encode(value));
                }
            }

            byte[] bytes = System.Text.Encoding.ASCII.GetBytes(postString.ToString());
            req.ContentLength = bytes.Length;

            System.IO.Stream os = req.GetRequestStream();
            os.Write(bytes, 0, bytes.Length);
            os.Close();

            System.Net.WebResponse resp = req.GetResponse();
            if (resp == null)
            {
                return(null);
            }

            System.IO.StreamReader sr = new System.IO.StreamReader(resp.GetResponseStream());
            return(sr.ReadToEnd().Trim());
        }
示例#5
0
        void FormCustomerMask_EventSave(bool isnew, ref bool cancel)
        {
            string  err  = "";
            Control cont = null;

            if (!FieldValidate(ref err, ref cont))
            {
                MessageBox.Show(err);
                cont.Select();
                cancel = true;
                return;
            }
            Result r;

            try
            {
                object[] NewValue = { numMaskID.EditValue, txtMaskName.EditValue, txtMaskValue.EditValue, cboMaskType.EditValue, cboCustType.EditValue, numOrderNo.EditValue };
                if (!isnew)
                {
                    r = _core.RemoteObject.Connection.Call(_core.RemoteObject.User.UserNo, 202, EditTxnCode, EditTxnCode, new object[] { NewValue, OldValue, FieldName });
                    MessageBox.Show("Амжилттай засварлалаа.");
                }
                else
                {
                    r = _core.RemoteObject.Connection.Call(_core.RemoteObject.User.UserNo, 202, AddTxnCode, AddTxnCode, new object[] { NewValue, FieldName });
                    MessageBox.Show("Амжилттай нэмлээ .");
                }
                if (r.ResultNo != 0)
                {
                    MessageBox.Show(r.ResultNo.ToString() + " " + r.ResultDesc);
                    cancel = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            FormUtility.SaveStateForm(appname, ref FormName);
            FormUtility.SaveStateGrid(appname, formname, ref gridView1);
        }
示例#6
0
        void FormTxnEntry_EventSave(bool isnew, ref bool cancel)
        {
            string  err  = "";
            Control cont = null;

            if (!FieldValidate(ref err, ref cont))
            {
                MessageBox.Show(err);
                cont.Select();
                cancel = true;
                return;
            }
            Result r;

            try
            {
                object[] NewValue = { numEntryCode.EditValue, numEntryTxnCode.EditValue, txtDRAcntMod.EditValue, txtDRAcntNo.EditValue, txtDRCurrCode.EditValue, txtDRRate.EditValue, txtDRAmount.EditValue, txtCRAcntMod.EditValue, txtCRAcntno.EditValue, txtCRCurrCode.EditValue, txtCRAmount.EditValue, txtCRRate.EditValue, txtDescription.EditValue, mmoCondition.EditValue };
                if (!isnew)
                {
                    r = _core.RemoteObject.Connection.Call(_core.RemoteObject.User.UserNo, 202, EditTxnCode, EditTxnCode, new object[] { NewValue, OldValue, FieldName });
                    MessageBox.Show("Амжилттай засварлалаа.");
                }
                else
                {
                    r = _core.RemoteObject.Connection.Call(_core.RemoteObject.User.UserNo, 202, AddTxnCode, AddTxnCode, new object[] { NewValue, FieldName });
                    MessageBox.Show("Амжилттай нэмлээ .");
                }
                if (r.ResultNo != 0)
                {
                    MessageBox.Show(r.ResultNo.ToString() + " " + r.ResultDesc);
                    cancel = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            FormUtility.SaveStateForm(appname, ref FormName);
            FormUtility.SaveStateGrid(appname, formname, ref gridView1);
        }
示例#7
0
        void FormPaContractType_EventSave(bool isnew, ref bool cancel)
        {
            string  err  = "";
            Control cont = null;

            if (!FieldValidate(ref err, ref cont))
            {
                MessageBox.Show(err);
                cont.Select();
                cancel = true;
                return;
            }
            Result r;

            try
            {
                object[] NewValue = { Static.ToStr(txtContractType.EditValue), Static.ToStr(txtName.EditValue), Static.ToStr(txtName2.EditValue), Static.ToInt(numOrderNo.EditValue), cboMethod.EditValue };
                if (!isnew)
                {
                    r = _core.RemoteObject.Connection.Call(_core.RemoteObject.User.UserNo, 2021, 140234, 140234, new object[] { NewValue, OldValue, FieldName });
                    MessageBox.Show("Амжилттай засварлалаа.");
                }
                else
                {
                    r = _core.RemoteObject.Connection.Call(_core.RemoteObject.User.UserNo, 2021, 140233, 140233, new object[] { NewValue, FieldName });
                    MessageBox.Show("Амжилттай нэмлээ .");
                }
                if (r.ResultNo != 0)
                {
                    MessageBox.Show(r.ResultNo.ToString() + " " + r.ResultDesc);
                    cancel = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            FormUtility.SaveStateForm(appname, ref FormName);
            FormUtility.SaveStateGrid(appname, formName, ref gridView1);
        }
示例#8
0
        /// <summary>
        /// Loading of the table content. 1st dimension <see cref="Rule"/>, 2nd dimension <see cref="Fund"/>
        /// </summary>
        private void LoadRules()
        {
            TableUtility tableUtility = new TableUtility();
            List <Fund>  fundList     = tableUtility.ConvertRangesToObjects <Fund>(tableUtility.ReadAllRows(Fund.GetDefaultValue()));
            List <Rule>  ruleList     = tableUtility.ConvertRangesToObjects <Rule>(tableUtility.ReadAllRows(Rule.GetDefaultValue()));

            tableLayoutPanel.ColumnCount = fundList.Count + 1;
            Padding margin = new Padding(1, 0, 0, 1);

            tableLayoutPanel.Controls.Add(new Label
            {
                AutoSize  = false,
                BackColor = Color.White,
                Width     = 500,
                Height    = 500,
                Margin    = margin
            }, 0, 0);

            for (int col = 0; col < fundList.Count; col++)
            {
                // Adding fund labels (columns)
                Label fundLabel = new VerticalLabel(-90)
                {
                    AutoSize  = false,
                    Height    = 500,
                    Width     = 50,
                    Text      = fundList[col].Name,
                    BackColor = Color.White,
                    TextAlign = ContentAlignment.BottomLeft,
                    Margin    = margin
                };
                FormUtility.BindObjectToControl(fundLabel, fundList[col]);
                tableLayoutPanel.Controls.Add(fundLabel, col + 1, 0);
            }

            foreach (Rule rule in ruleList)
            {
                AddRule(rule);
            }
        }
示例#9
0
        private void FormBrokerCompany_Load(object sender, EventArgs e)
        {
            object[] Value = new object[14];
            Value[0]  = Static.ToLong(numBrokeriD.EditValue);
            Value[1]  = Static.ToStr(txtName.EditValue);
            Value[2]  = Static.ToStr(txtName2.EditValue);
            Value[3]  = Static.ToInt(cboCountryCode.EditValue);
            Value[4]  = Static.ToLong(cboBankID.EditValue);
            Value[5]  = Static.ToLong(cboBankBranchID.EditValue);
            Value[6]  = Static.ToLong(numAcountNo.EditValue);
            Value[7]  = Static.ToStr(cboCurCode.EditValue);
            Value[8]  = Static.ToStr(txtAddress.EditValue);
            Value[9]  = Static.ToStr(txtEmail.EditValue);
            Value[10] = Static.ToStr(txtTelephone.EditValue);
            Value[11] = Static.ToStr(txtFax.EditValue);
            Value[12] = Static.ToStr(txtWebSite.EditValue);
            Value[13] = Static.ToInt(numOrderNo.EditValue);

            OldValue = Value;

            if (_brokerid != 0)
            {
                Initcombo();
                //ucBroker.FieldLinkSetValues();
                RefreshData(_brokerid);
                ucBroker.FieldLinkSetRejectState();
            }
            else
            {
                Initcombo();
                ucBroker.FieldLinkSetNewState();
                cboBankBranchID.ItemIndex = 0;
                cboBankID.ItemIndex       = 0;
                cboCountryCode.ItemIndex  = 0;
                cboCurCode.ItemIndex      = 0;
                numOrderNo.EditValue      = 0;
            }

            FormUtility.RestoreStateForm(appname, ref FormName);
        }
示例#10
0
        public FrmSupplier()
        {
            InitializeComponent();
            FormUtility.FormatForm(this);
            lblNotify1.Text = "";
            m_Suplier       = null;
            m_Subsupplier   = null;
            m_User          = null;
            IGridviewContextMenu ctx       = new CompanyContextMenu();
            IGridviewContextMenu ctxDeputy = new DeputyContextMenu();

            gridUtility1 = new GridUtility(gridControl1, ctxDeputy);
            ImageList myImageList = new ImageList();

            myImageList = new ImageList();
            myImageList.Images.Add(TmTech_v1.Properties.Resources.iconSelect);
            myImageList.Images.Add(TmTech_v1.Properties.Resources.folder);
            myImageList.Images.Add(TmTech_v1.Properties.Resources.warming);
            treeviewsupplier.ImageList          = myImageList;
            treeviewsupplier.SelectedImageIndex = 0;
            treeviewsupplier.DrawNode          += Treeviewsupplier_DrawNode;
        }
示例#11
0
        private void frmEditQuotation_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (isEdited == true)
            {
                DialogResult result = FormUtility.CloseWithoutSave();
                if (result == DialogResult.No)
                {
                    e.Cancel = true;
                    return;
                }
            }
            List <string> lstcolumnChecked = new List <string>();

            foreach (CheckComboBoxItem item in checkBoxCombobox1.Items)
            {
                if (item.CheckState == true)
                {
                    lstcolumnChecked.Add(item.Value);
                }
            }
            UtilityFunction.WriteColumnToshow(lstcolumnChecked);
        }
示例#12
0
 /// <summary>
 /// 双击行查看商品库存变动明细
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1)
     {
         StoreStockQueryModel    model            = dgvList.Rows[e.RowIndex].DataBoundItem as StoreStockQueryModel;
         FrmGoodsStockChangeList fGoodsChangeList = new FrmGoodsStockChangeList();
         fGoodsChangeList.Tag       = model;
         fGoodsChangeList.storeInfo = new StoreInfoModel()
         {
             StoreId   = store == null ? 0 : store.StoreId,
             StoreName = txtInStore.Text.Trim()
         };
         //打开方式
         TabControl tab = this.Parent.Parent as TabControl;
         if (FormUtility.CheckOpenForm(fGoodsChangeList.Name))
         {
             tab.TabPages.RemoveByKey(fGoodsChangeList.Name);
         }
         tab.AddTabFormPage(fGoodsChangeList);
         tab.SelectedTab = tab.TabPages[fGoodsChangeList.Name];
     }
 }
示例#13
0
        void ucSalesSearch_EventDataChanged()
        {
            ucSalesSearch.FieldLinkSetColumnCaption(0, "Гүйлгээний огноо");
            ucSalesSearch.FieldLinkSetColumnCaption(1, "Борлуулалт №");
            ucSalesSearch.FieldLinkSetColumnCaption(2, "Харилцагчийн дугаар");
            ucSalesSearch.FieldLinkSetColumnCaption(3, "Нэр");
            ucSalesSearch.FieldLinkSetColumnCaption(4, "Төлөв");
            ucSalesSearch.FieldLinkSetColumnCaption(5, "Борлуулалтын үнэ");
            ucSalesSearch.FieldLinkSetColumnCaption(6, "Хөнгөлөлтийн үнэ");
            ucSalesSearch.FieldLinkSetColumnCaption(7, "Үнэ");
            ucSalesSearch.FieldLinkSetColumnCaption(8, "VAT");
            ucSalesSearch.FieldLinkSetColumnCaption(9, "Нийт төлбөр");
            ucSalesSearch.FieldLinkSetColumnCaption(10, "Кассаар");
            ucSalesSearch.FieldLinkSetColumnCaption(11, "Картаар");
            ucSalesSearch.FieldLinkSetColumnCaption(12, "Бусад");
            ucSalesSearch.FieldLinkSetColumnCaption(13, "Хэрэглэгч №");
            ucSalesSearch.FieldLinkSetColumnCaption(14, "Хэрэглэгчийн овог");
            ucSalesSearch.FieldLinkSetColumnCaption(15, "Хэрэглэгчийн нэр");

            FormUtility.RestoreStateGrid(appname, formname, ref ucSalesSearch.gridView1);
            FormUtility.RestoreStateVGrid(appname, formname, ref ucSalesSearch.ucParameterPanel1.vGridControl1, ref ucSalesSearch.groupControl1);
        }
示例#14
0
        void FormBank_EventRefreshAfter()
        {
            FormUtility.SaveStateForm(appname, ref FormName);
            this.FieldLinkSetColumnCaption(0, "Дамжлагын дугаар");
            this.FieldLinkSetColumnCaption(1, "Дамжлагын нэр");
            this.FieldLinkSetColumnCaption(2, "Дамжлагын нэр2");
            this.FieldLinkSetColumnCaption(3, "Дамжлагын тайлбар");
            this.FieldLinkSetColumnCaption(4, "Дамжлагын тайлбар2");
            this.FieldLinkSetColumnCaption(5, "Ажлын хэдэн өдөрт хийгдэх ажил вэ");
            appname  = _core.ApplicationName;
            formname = "Parameter." + this.Name;
            FormName = this;
            FormUtility.RestoreStateForm(appname, ref FormName);
            FormUtility.RestoreStateGrid(appname, formname, ref gridView1);
            switch (btn)
            {
            case 0: gridView1.FocusedRowHandle = rowhandle; break;

            case 1: gridView1.FocusedRowHandle = rowhandle - 1; break;
            }
            btn = 0;
        }
示例#15
0
        public frmEditPO(Po po)
        {
            InitializeComponent();
            IInitColumn       quotationDetailColumn = new QuotationDetailColumn(gridView1, checkBoxCombobox1);
            List <GridColumn> lstDefinedColumn      = new List <GridColumn>()
            {
                colDimension, colDonvi
            };

            gridUtility = new GridUtility(gridControl1, false, false, 35, colDescription);
            gridUtility.ColProductPicture       = colPhoto;
            gridUtility.ColProductPicturePath   = colImgPath;
            gridUtility.ColDimensionPicture     = colDimension;
            gridUtility.ColDimensionPicturePath = colDimensionPath;
            FormUtility.FormatForm(this);
            lblNotify1.Text     = "";
            m_Company           = po.Company;
            m_Po                = po;
            gridView1.RowHeight = 150;
            isEdited            = false;
            quotationDetailColumn.InitColumn(lstDefinedColumn);
        }
示例#16
0
        public void SetFormatGrid()
        {
            FormUtility.Column_SetCaption(ref gridView1, 0, "No");
            FormUtility.Column_SetCaption(ref gridView1, 1, "Нэр");
            FormUtility.Column_SetCaption(ref gridView1, 2, "Нэр2");
            FormUtility.Column_SetCaption(ref gridView1, 3, "Төрөл");
            FormUtility.Column_SetCaption(ref gridView1, 4, "Урт");
            FormUtility.Column_SetCaption(ref gridView1, 5, "Дефаулт");
            FormUtility.Column_SetCaption(ref gridView1, 6, "Мандатор");
            FormUtility.Column_SetCaption(ref gridView1, 7, "Маск");
            FormUtility.Column_SetCaption(ref gridView1, 8, "Тайлбар");
            FormUtility.Column_SetCaption(ref gridView1, 9, "Лист ID");
            FormUtility.Column_SetCaption(ref gridView1, 10, "Лист Засах");
            FormUtility.Column_SetCaption(ref gridView1, 11, "Лист Талбар1");
            FormUtility.Column_SetCaption(ref gridView1, 12, "Лист Талбар2");
            FormUtility.Column_SetCaption(ref gridView1, 13, "Эрэмбэ");
            FormUtility.Column_SetCaption(ref gridView1, 14, "Тооцоолол");
            FormUtility.Column_SetCaption(ref gridView1, 15, "Эх жагсаалт");
            FormUtility.Column_SetCaption(ref gridView1, 16, "Шүүлт хийх талбар");

            FormUtility.SetFormatGrid(ref gridView1, false);
        }
示例#17
0
        void FormPaScheduleType_EventRefreshAfter()
        {
            FormUtility.SaveStateForm(appname, ref FormName);
            this.FieldLinkSetColumnCaption(0, "Төрлийн код, дугаар");
            this.FieldLinkSetColumnCaption(1, "Төрлийн нэр ");
            this.FieldLinkSetColumnCaption(2, "Төрлийн нэр 2");
            this.FieldLinkSetColumnCaption(3, "Хэмжигдэх нэгж");
            this.FieldLinkSetColumnCaption(4, "Хуваарь хийх арга ");
            this.FieldLinkSetColumnCaption(5, "Хуваарь дээрх таскын урт ");
            appname = _core.ApplicationName;
            //formname = "Parameter." + this.Name;
            FormName = this;
            FormUtility.RestoreStateForm(appname, ref FormName);
            FormUtility.RestoreStateGrid(appname, "Parameter." + this.Name, ref gridView1);
            switch (btn)
            {
            case 0: gridView1.FocusedRowHandle = rowhandle; break;

            case 1: gridView1.FocusedRowHandle = rowhandle - 1; break;
            }
            btn = 0;
        }
示例#18
0
        void ucSalesSearch_EventDataChanged()
        {
            ucSalesPayBO.FieldLinkSetColumnCaption(0, "Гүйлгээний огноо");
            ucSalesPayBO.FieldLinkSetColumnCaption(1, "Гүйлгээний огноо цаг");
            ucSalesPayBO.FieldLinkSetColumnCaption(2, "Ээлжийн №");
            ucSalesPayBO.FieldLinkSetColumnCaption(3, "Хэрэглэгч №");
            ucSalesPayBO.FieldLinkSetColumnCaption(4, "POS №");

            ucSalesPayBO.FieldLinkSetColumnCaption(5, "AREA №");
            ucSalesPayBO.FieldLinkSetColumnCaption(6, "Борлуулалт №");
            ucSalesPayBO.FieldLinkSetColumnCaption(7, "Харилцагчийн №");
            ucSalesPayBO.FieldLinkSetColumnCaption(8, "Нэр");
            ucSalesPayBO.FieldLinkSetColumnCaption(9, "Төлбөрийн №");

            ucSalesPayBO.FieldLinkSetColumnCaption(10, "Төлбөрийн нэр");
            ucSalesPayBO.FieldLinkSetColumnCaption(11, "Төлбөрийн хэрэгсэлийн №");
            ucSalesPayBO.FieldLinkSetColumnCaption(12, "Дүн");
            ucSalesPayBO.FieldLinkSetColumnCaption(13, "Төлөв");

            FormUtility.RestoreStateGrid(appname, formname, ref ucSalesPayBO.gridView1);
            FormUtility.RestoreStateVGrid(appname, formname, ref ucSalesPayBO.ucParameterPanel1.vGridControl1, ref ucSalesPayBO.groupControl1);
        }
示例#19
0
        void FormPaDaytype_EventRefreshAfter()
        {
            FormUtility.SaveStateForm(appname, ref FormName);
            this.FieldLinkSetColumnCaption(0, "Өдрийн төрлийн код");
            this.FieldLinkSetColumnCaption(1, "Нэр");
            this.FieldLinkSetColumnCaption(2, "Нэр2");
            this.FieldLinkSetColumnCaption(3, "Тайлбар");
            this.FieldLinkSetColumnCaption(4, "Тухайн өдрийн календар байхгүй бол default сонгох");
            this.FieldLinkSetColumnCaption(5, "Эрэмбэ");

            appname  = _core.ApplicationName;
            FormName = this;
            FormUtility.RestoreStateForm(appname, ref FormName);
            FormUtility.RestoreStateGrid(appname, "Parameter." + this.Name, ref gridView1);
            switch (btn)
            {
            case 0: gridView1.FocusedRowHandle = rowhandle; break;

            case 1: gridView1.FocusedRowHandle = rowhandle - 1; break;
            }
            btn = 0;
        }
示例#20
0
        private void Init()
        {
            this.EventRefresh      += new delegateEventRefresh(FormRebateDetail_EventRefresh);
            this.EventRefreshAfter += new delegateEventRefreshAfter(FormRebateDetail_EventRefreshAfter);
            this.EventSave         += new delegateEventSave(FormRebateDetail_EventSave);
            this.EventEdit         += new delegateEventEdit(FormRebateDetail_EventEdit);
            this.EventDelete       += new delegateEventDelete(FormRebateDetail_EventDelete);

            this.FieldLinkAdd("numMasterID", "MasterID", "", true, true);
            this.FieldLinkAdd("cboProdType", "ProdType", "", true, false);
            this.FieldLinkAdd("cboProdNo", "ProdNo", "", false, false);
            this.FieldLinkAdd("cboCalcType", "CalcType", "", true, false);
            this.FieldLinkAdd("numCalcAmount", "CalcAmount", "", false, false);


            FormUtility.LookUpEdit_SetList(ref cboProdType, 0, "Бараа");
            FormUtility.LookUpEdit_SetList(ref cboProdType, 1, "Үйлчилгээ");


            FormUtility.LookUpEdit_SetList(ref cboCalcType, 0, "Дүн");
            FormUtility.LookUpEdit_SetList(ref cboCalcType, 1, "Хувь");
        }
示例#21
0
        void FormPosTerminal_EventRefreshAfter()
        {
            FormUtility.SaveStateForm(appname, ref FormName);
            this.FieldLinkSetColumnCaption(0, "ПОС ын дугаар ");
            this.FieldLinkSetColumnCaption(1, "ПОС ын нэр ");
            this.FieldLinkSetColumnCaption(2, "ПОС ын тайлбар");
            this.FieldLinkSetColumnCaption(3, "ПОС ын IP");
            this.FieldLinkSetColumnCaption(4, "ПОС ын MAC");
            this.FieldLinkSetColumnCaption(5, "ПОС ын төрөл");
            appname = _core.ApplicationName;
            //formname = "Parameter." + this.Name;
            FormName = this;
            FormUtility.RestoreStateForm(appname, ref FormName);
            FormUtility.RestoreStateGrid(appname, "Parameter." + this.Name, ref gridView1);
            switch (btn)
            {
            case 0: gridView1.FocusedRowHandle = rowhandle; break;

            case 1: gridView1.FocusedRowHandle = rowhandle - 1; break;
            }
            btn = 0;
        }
示例#22
0
        //public void Init_CON(DataRow DR)
        //{
        //    object[] obj = new object[2];
        //    Result res;
        //    try
        //    {
        //        obj[0] = Static.ToInt(Account_Type);
        //        obj[1] = Static.ToLong(_ID);
        //        res = _core.RemoteObject.Connection.Call(_core.RemoteObject.User.UserNo, 206, 231015, 231015, obj);

        //        if (res.ResultNo == 0)
        //        {
        //            ucAccountTxnList.DataSource = res.Data.Tables[0];
        //            LoadCONData();
        //        }
        //        else
        //        {
        //            MessageBox.Show(res.ResultNo.ToString() + " " + res.ResultDesc);
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        MessageBox.Show(ex.Message);
        //    }
        //}
        private void LoadCONData()
        {
            //ucAccountTxnList.gridView1.OptionsView.ColumnAutoWidth = false;
            //ucAccountTxnList.gridView1.BestFitColumns();
            FormUtility.RestoreStateGrid(appname, formname, ref ucAccountTxnList.gridView1);
            ucAccountTxnList.FieldLinkSetColumnCaption(0, "Журналын дугаар");
            ucAccountTxnList.FieldLinkSetColumnCaption(1, "Гүйлгээний хэсгийн журнал дугаар");
            ucAccountTxnList.FieldLinkSetColumnCaption(2, "Дэд журналын дугаар");
            ucAccountTxnList.FieldLinkSetColumnCaption(3, "Дугаар");
            ucAccountTxnList.FieldLinkSetColumnCaption(4, "Гүйлгээний оролт");
            ucAccountTxnList.FieldLinkSetColumnCaption(5, "Гүйлгээний огноо");
            ucAccountTxnList.FieldLinkSetColumnCaption(6, "Гүйлгээний огноо, цаг минут");
            ucAccountTxnList.FieldLinkSetColumnCaption(7, "Дансны дугаар");
            ucAccountTxnList.FieldLinkSetColumnCaption(8, "Салбарын дугаар");
            ucAccountTxnList.FieldLinkSetColumnCaption(9, "Бүтээгдэхүүний дугаар");
            ucAccountTxnList.FieldLinkSetColumnCaption(10, "Гүйлгээ хийсэн хэрэглэгчийн дугаар");
            ucAccountTxnList.FieldLinkSetColumnCaption(11, "Комьютерийн нэр");
            ucAccountTxnList.FieldLinkSetColumnCaption(12, "Комьютерийн IP");
            ucAccountTxnList.FieldLinkSetColumnCaption(13, "Комьютерийн MAC");
            ucAccountTxnList.FieldLinkSetColumnCaption(14, "Гүйлгээний код");
            ucAccountTxnList.FieldLinkSetColumnCaption(15, "Гүйлгээний дүн");
            ucAccountTxnList.FieldLinkSetColumnCaption(16, "Гүйлгээний валютын ханш");
            ucAccountTxnList.FieldLinkSetColumnCaption(17, "Гүйлгээний валют");
            ucAccountTxnList.FieldLinkSetColumnCaption(18, "Гүйлгээний дараах үлдэгдэл");
            ucAccountTxnList.FieldLinkSetColumnCaption(19, "Харьцсан данс");
            ucAccountTxnList.FieldLinkSetColumnCaption(20, "Харьцсан дансны валют");
            ucAccountTxnList.FieldLinkSetColumnCaption(21, "Харьцсан валютын ханш");
            ucAccountTxnList.FieldLinkSetColumnCaption(22, "Харьцсан дансны дүн");
            ucAccountTxnList.FieldLinkSetColumnCaption(23, "Харьцсан дансны суурь дүн");
            ucAccountTxnList.FieldLinkSetColumnCaption(24, "Гүйлгээний утга");
            ucAccountTxnList.FieldLinkSetColumnCaption(25, "Буцаагдсан эсэх");
            ucAccountTxnList.FieldLinkSetColumnCaption(26, "Бэлэн гүйлгээ эсэх");
            ucAccountTxnList.FieldLinkSetColumnCaption(27, "Зөвшөөрсөн теллерийн дугаар");
            ucAccountTxnList.FieldLinkSetColumnCaption(28, "Ерөнхий дэвтэрлүү татагдсан эсэх");
            ucAccountTxnList.FieldLinkSetColumnCaption(29, "Үндсэн гүйлгээ мөн эсэх");
            ucAccountTxnList.FieldLinkSetColumnCaption(30, "Групп гүйлгээний код");
            FormUtility.RestoreStateGrid(appname, formname, ref ucAccountTxnList.gridView1);
            FormUtility.RestoreStateVGrid(appname, formname, ref ucAccountTxnList.ucParameterPanel1.vGridControl1, ref ucAccountTxnList.groupControl1);
        }
示例#23
0
 void ucBacAccountList_EventDataChanged()
 {
     ucCurRateHistory.FieldLinkSetColumnCaption(0, "Валют");
     //    ucCurRateHistory.gridView1.Columns[0].Width = 50;
     ucCurRateHistory.FieldLinkSetColumnCaption(1, "Огноо");
     ucCurRateHistory.FieldLinkSetColumnCaption(2, "Албан ханш");
     ucCurRateHistory.FieldLinkSetColumnCaption(3, "Бэлэн авах ханш");
     ucCurRateHistory.FieldLinkSetColumnCaption(4, "Бэлэн зарах ханш");
     ucCurRateHistory.FieldLinkSetColumnCaption(5, "Бэлэн бус авах ханш");
     ucCurRateHistory.FieldLinkSetColumnCaption(6, "Бэлэн бус зарах ханш");
     ucCurRateHistory.FieldLinkSetColumnCaption(7, "Өмнөх өдрийн ханш (Хуучин ханш)");
     ucCurRateHistory.FieldLinkSetColumnCaption(8, "Эквивалент GL. ");
     ucCurRateHistory.FieldLinkSetColumnCaption(9, "Валютын код");
     ucCurRateHistory.FieldLinkSetColumnCaption(10, "Арилжааны ашиг GL");
     ucCurRateHistory.FieldLinkSetColumnCaption(11, "Арилжааны алдагдал GL");
     ucCurRateHistory.FieldLinkSetColumnCaption(12, "Ханшийн тэгшитгэлийн ашиг GL");
     ucCurRateHistory.FieldLinkSetColumnCaption(13, "Ханшийн тэгшитгэлийн алдагдал GL");
     ucCurRateHistory.FieldLinkSetColumnCaption(14, "Өмнөх өдрийн ханш (Хуучин ханш)");
     ucCurRateHistory.FieldLinkSetColumnCaption(15, "Жагсаалтын эрэмбэ");
     FormUtility.RestoreStateGrid(appname, formname, ref ucCurRateHistory.gridView1);
     FormUtility.RestoreStateVGrid(appname, formname, ref ucCurRateHistory.ucParameterPanel1.vGridControl1, ref ucCurRateHistory.groupControl1);
 }
示例#24
0
        public frmCreateQuotation()
        {
            InitializeComponent();
            IInitColumn       quotationDetailColumn = new QuotationDetailColumn(gridView1, checkBoxCombobox1);
            List <GridColumn> lstDefinedColumn      = new List <GridColumn>()
            {
                colDimension, colDonvi
            };

            gridUtility = new GridUtility(gridControl1, false, false, 35, colDescription);
            gridUtility.ColProductPicture       = colPhoto;
            gridUtility.ColProductPicturePath   = colImgPath;
            gridUtility.ColDimensionPicture     = colDimension;
            gridUtility.ColDimensionPicturePath = colDimensionPath;
            FormUtility.FormatForm(this);
            lblNotify1.Text     = "";
            m_Quotation         = new Quotation();
            m_Company           = null;
            gridView1.RowHeight = 150;
            this.checkBoxCombobox1.CheckStateChanged += new System.EventHandler(this.checkComboBox1_CheckStateChanged);
            quotationDetailColumn.InitColumn(lstDefinedColumn);
        }
示例#25
0
 void RefStepItem(int StepItem)
 {
     try
     {
         Result r = _core.RemoteObject.Connection.Call(_core.RemoteObject.User.UserNo, 202, SI_SelectTxnCode, SI_SelectTxnCode, new object[] { StepItem });
         if (r.ResultNo != 0)
         {
             MessageBox.Show(r.ResultNo.ToString() + " " + r.ResultDesc);
             return;
         }
         else
         {
             grdStepItem.DataSource            = r.Data.Tables[0];
             gvwStepItem.Columns[0].ColumnEdit = CreateRepositoryCheckEdit();
             gvwStepItem.Columns[0].Caption    = "Төлөв";
             gvwStepItem.Columns[0].OptionsColumn.AllowEdit = true;
             gvwStepItem.Columns[1].Caption = "Дамжлагын дугаар";
             gvwStepItem.Columns[1].OptionsColumn.AllowEdit = false;
             gvwStepItem.Columns[2].Caption = "Дамжлагын нэр";
             gvwStepItem.Columns[2].OptionsColumn.AllowEdit = false;
             gvwStepItem.Columns[3].Caption = "Дамжлагын нэр 2";
             gvwStepItem.Columns[3].OptionsColumn.AllowEdit = false;
             gvwStepItem.Columns[4].Caption = "Дамжлагын тайлбар";
             gvwStepItem.Columns[4].OptionsColumn.AllowEdit = false;
             gvwStepItem.Columns[5].Caption = "Дамжлагын тайлбар 2";
             gvwStepItem.Columns[5].OptionsColumn.AllowEdit = false;
             gvwStepItem.Columns[6].Caption = "Ажлын хэдэн өдөрт хийгдэх ажил вэ ";
             gvwStepItem.Columns[6].OptionsColumn.AllowEdit = false;
             gvwStepItem.Columns[7].Caption = "Жагсаалтын эрэмбэ";
             gvwStepItem.Columns[7].OptionsColumn.AllowEdit = false;
             FormUtility.RestoreStateGrid(appname, formname, ref gvwStepItem);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
示例#26
0
 private void RiskGroup_Load(object sender, EventArgs e)
 {
     FormUtility.RestoreStateForm(appname, ref FormName);
     Init();
     RefreshRiskGroupData();
     RefreshRiskCondData(pRiskGroupID);
     if (_core.resource != null)
     {
         btnRiskGroupAdd.Image    = _core.resource.GetImage("navigate_save");
         btnRiskGroupEdit.Image   = _core.resource.GetImage("navigate_edit");
         btnRiskGroupDelete.Image = _core.resource.GetImage("navigate_delete");
         bntRiskGroupClear.Image  = _core.resource.GetImage("navigate_clear");
         btnRiskRemove.Image      = _core.resource.GetImage("navigate_delete");
         btnRiskJoin.Image        = _core.resource.GetImage("navigate_add");
         btnRiskAddCon.Image      = _core.resource.GetImage("navigate_add");
         simpleButton4.Image      = _core.resource.GetImage("navigate_delete");
         btnjoin.Image            = _core.resource.GetImage("navigate_add");
     }
     FormUtility.RestoreStateForm(appname, ref FormName);
     FormUtility.RestoreStateGrid(appname, formname, ref gvwRiskGroup);
     FormUtility.RestoreStateGrid(appname, formname, ref gvwRisk);
     FormUtility.RestoreStateGrid(appname, formname, ref gvwCond);
 }
示例#27
0
        void FormPAServType_EventRefreshAfter()
        {
            FormUtility.SaveStateForm(appname, ref FormName);
            this.FieldLinkSetColumnCaption(0, "Төрлийн код, дугаар");
            this.FieldLinkSetColumnCaption(1, "Төрлийн нэр ");
            this.FieldLinkSetColumnCaption(2, "Төрлийн нэр 2");
            this.FieldLinkSetColumnCaption(3, "Ангилал");
            this.FieldLinkSetColumnCaption(4, "Тайлбар");
            this.FieldLinkSetColumnCaption(5, "Эрэмбийн дугаар");

            appname = _core.ApplicationName;
            //formname = "Parameter." + this.Name;
            FormName = this;
            FormUtility.RestoreStateForm(appname, ref FormName);
            FormUtility.RestoreStateGrid(appname, "Parameter." + this.Name, ref gridView1);
            switch (btn)
            {
            case 0: gridView1.FocusedRowHandle = rowhandle; break;

            case 1: gridView1.FocusedRowHandle = rowhandle - 1; break;
            }
            btn = 0;
        }
示例#28
0
        /// <summary>
        /// Initializes the programmatically added controls.
        /// </summary>
        private void InitializeCustomComponents()
        {
            save                = FormUtility.CreateButton("Speichern", 50, 230);
            addNewRecord        = FormUtility.CreateButton("Neuen Eintrag hinzufügen", 630, 0);
            addNewRecord.Click += (sender, e) => new AddDurationRecordForm(this).Visible = true;
            dataGridView        = FormUtility.CreateDataGridView(typeof(DurationRecord), 630, 140, 300, 600);
            ToolStripMenuItem contextMenuItemDelete = FormUtility.CreateContextMenuItem("Löschen", (sender, e) =>
            {
                TableUtility tableUtility = new TableUtility();
                tableUtility.DeleteTableRow(GetSelectedRecord());
                dataGridView.Rows.Remove(dataGridView.SelectedRows[0]);
            });
            ToolStripMenuItem contextMenuItemEdit = FormUtility.CreateContextMenuItem("Bearbeiten", (sender, e) =>
            {
                _ = new AddDurationRecordForm(GetSelectedRecord(), this)
                {
                    Visible = true
                };
            });

            FormUtility.AddContextMenu(dataGridView, contextMenuItemEdit, contextMenuItemDelete);
            FormUtility.AddControlsToForm(this, dataGridView, save, addNewRecord);
        }
示例#29
0
        private void btnRemove_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = FormUtility.MsgDelete();

            if (dialogResult == DialogResult.Yes)
            {
                int             i      = gridView1.GetSelectedRows().FirstOrDefault();
                QuotationDetail detail = gridView1.GetRow(i) as QuotationDetail;
                if (detail != null)
                {
                    using (IUnitOfWork uow = new UnitOfWork())
                    {
                        uow.QuotationDetailRepository.Remove(detail);
                        uow.Commit();
                    }
                }
                gridView1.DeleteRow(i);
            }
            else
            {
                return;
            }
        }
示例#30
0
 void SetComboSub(string ValueField, string NameField, DevExpress.XtraEditors.LookUpEdit LEdit, DataTable DT, string Filter, int[] Hide)
 {
     try
     {
         string msg = "";
         if (DT == null)
         {
             msg = "Dictionary-д утга оруулна ууаагүй байна. ";
         }
         else
         {
             FormUtility.LookUpEdit_SetList(ref LEdit, DT, ValueField, NameField, Filter, Hide);
         }
         if (msg != "")
         {
             MessageBox.Show(msg);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + " " + Filter);
     }
 }