示例#1
0
        private void ApplyFilters()
        {
            GridEXFilterCondition condition = new GridEXFilterCondition();
            GridEXColumn          column    = new GridEXColumn();

            gridExAgreementsListGrouped.RemoveFilters();

            if (rdbKTM.Checked)
            {
                column    = gridExAgreementsListGrouped.RootTable.Columns["KTM"];
                condition = new GridEXFilterCondition(column, ConditionOperator.Equal, gridExProductsAndArticles.CurrentRow.Cells["KTM"].Text);
            }
            else if (rdbDescriptor.Checked)
            {
                column    = gridExAgreementsListGrouped.RootTable.Columns["Deskryptor"];
                condition = new GridEXFilterCondition(column, ConditionOperator.Equal, gridExProductsAndArticles.CurrentRow.Cells["Deskryptor"].Text);
            }
            else if (rdbTitle.Checked)
            {
                column    = gridExAgreementsListGrouped.RootTable.Columns["Tytul"];
                condition = new GridEXFilterCondition(column, ConditionOperator.Equal, gridExProductsAndArticles.CurrentRow.Cells["Tytuł"].Text);
            }

            gridExAgreementsListGrouped.RootTable.ApplyFilter(condition);
        }
        public void filterapply(GridEX grid, string filtername, CreateFilterForm hiddeninstanceinitialized)
        {
            foreach (string item in hiddeninstanceinitialized.comboBox7.Items)
            {
                if (item == filtername)
                {
                    hiddeninstanceinitialized.comboBox7.SelectedItem = filtername;
                    hiddeninstanceinitialized.comboBox7_SelectedIndexChanged(this, new EventArgs());

                    List <string> stacknames = new List <string>();
                    hiddeninstanceinitialized.processList(ref grid, false, 1, stacknames);
                }
            }
            foreach (string item in hiddeninstanceinitialized.comboBox1.Items)
            {
                if (item == filtername)
                {
                    hiddeninstanceinitialized.comboBox1.SelectedItem = filtername;
                    //hiddeninstanceinitialized.comboBox1_SelectedIndexChanged(this, new EventArgs());
                    GridEXColumn column = grid.RootTable.Columns[hiddeninstanceinitialized.comboBox5.SelectedValue.ToString()];


                    GridEXFilterCondition singlefiltercondtion = hiddenInstance.CreateSinglefilter(hiddenInstance.textBox6.Text, hiddenInstance.textBox7.Text, hiddenInstance.comboBox6.SelectedValue.ToString(), column);


                    grid.RootTable.FilterCondition = singlefiltercondtion;
                    grid.RootTable.ApplyFilter(singlefiltercondtion);
                    break;
                }
            }
            grid.Refetch();
            grid.Select();
        }
示例#3
0
 private void TryRun(string baseName, string tableName, string columnName)
 {
     Monitor tempLocal0 = new Monitor
     {
         Name = GetWizardName(baseName)
     };
     Monitor monitor = tempLocal0;
     GridEXFilterCondition tempLocal1 = new GridEXFilterCondition
     {
         Column = GetColumn(tableName, columnName),
         ConditionOperator = ConditionOperator.Equal,
         Value1 = baseName
     };
     GridEXFilterCondition condition = tempLocal1;
     monitor.FilterCondition = condition;
     IEnumerable<Actions.Action> actions = CreateActions(baseName);
     if (actions != null)
     {
         monitor.Actions.AddRange(actions);
     }
     if (MonitorPropertiesDialog.ShowDialog(monitor) == DialogResult.OK)
     {
         MonitorSettings.Instance.AddEntity(monitor);
     }
 }
示例#4
0
 private void btnApplySpecialCaseFilter_Click(object sender, EventArgs e)
 {
     grexAppealsReadyForAssignment.RootTable.RemoveFilter();
     if (FlagCodeMultiDropDown.Text.Trim() != string.Empty)
     {
         GridEXFilterCondition filtSpecialCase = new GridEXFilterCondition(grexAppealsReadyForAssignment.RootTable.Columns["SpecialCase"], ConditionOperator.Contains, FlagCodeMultiDropDown.Text.Trim());
         grexAppealsReadyForAssignment.RootTable.ApplyFilter(filtSpecialCase);
     }
 }
示例#5
0
 private void btnFind_Click(object sender, EventArgs e)
 {
     if ((cmbFindColumn.SelectedItem != null) && (cmbFindOperator.SelectedItem != null))
     {
         GridEXFilterCondition condition = new GridEXFilterCondition((GridEXColumn)cmbFindColumn.SelectedItem, ((FilterOperatorListItem)cmbFindOperator.SelectedItem).Operator, GetFindValue());
         grid.Find(condition, -1, 1);
         grid.Focus();
     }
 }
        private void button2_Click_1(object sender, EventArgs e)
        {
            //FilterLog.WriteToLog("Debug Level 1:applying filter (saved filters)");
            this.pushedonce = true;
            if (this.listBox1.Text == "")
            {
                return;
            }
            myFilter = "Επιλογη βάση φίλτρου:" + this.listBox1.Text;



            prefix = "";



            string simpleoscomposite = (this.listBox1.SelectedIndex > lastsimpleidx) ? "ΣΥΝΘΕΤΟ" : "ΑΠΛΟ";


            if (simpleoscomposite == "ΣΥΝΘΕΤΟ")
            {
                hiddenInstance.comboBox7.Text = this.listBox1.Text;

                //hiddenInstance.updatecombos();
                // Dictionary<string, double> overridepercssstoreit = new Dictionary<string, double>();


                hiddenInstance.comboBox7.SelectedItem = this.listBox1.SelectedItem;
                hiddenInstance.comboBox7_SelectedIndexChanged(this, new EventArgs());

                List <string> stacknames = new List <string>();
                hiddenInstance.processList(ref this.gridEX2, false, 1, stacknames);

                this.textBox1.Text = gridEX2.RowCount.ToString() + " εγγραφές";
            }
            if (simpleoscomposite == "ΑΠΛΟ")
            {
                hiddenInstance.comboBox1.SelectedItem = this.listBox1.SelectedItem;


                GridEXColumn column = this.gridEX2.RootTable.Columns[this.arrayofcolumns[hiddenInstance.comboBox5.SelectedIndex].ToString()];


                GridEXFilterCondition singlefiltercondtion = hiddenInstance.CreateSinglefilter(hiddenInstance.textBox6.Text, hiddenInstance.textBox7.Text, hiddenInstance.comboBox6.SelectedValue.ToString(), column);


                this.gridEX2.RootTable.FilterCondition = singlefiltercondtion;
                this.gridEX2.RootTable.ApplyFilter(singlefiltercondtion);
            }
            this.gridEX2.Refetch();
            this.gridEX2.Select();
            selectfiltered(this.gridEX2);
        }
示例#7
0
        private void ApplyFilters()
        {
            GridEXFilterCondition condition = new GridEXFilterCondition();
            GridEXColumn          column    = new GridEXColumn();

            gridExAgreementsListGrouped.RemoveFilters();

            string ktm           = gridExDescriptorChanges.CurrentRow.Cells["KTM"].Value.ToString();
            string descriptorOld = gridExDescriptorChanges.CurrentRow.Cells["DESKRYPOTR_OLD"].Value.ToString();
            string findString    = string.Format("{0}|{1};", ktm, descriptorOld);

            column = gridExAgreementsListGrouped.RootTable.Columns["Find"];
            condition.AddCondition(new GridEXFilterCondition(column, ConditionOperator.Contains, findString));

            gridExAgreementsListGrouped.RootTable.ApplyFilter(condition);
        }
示例#8
0
        protected void Rebind()
        {
            if (grid.RootTable.FilterCondition != null)
            {
                filterCondition = (GridEXFilterCondition)grid.RootTable.FilterCondition.FilterCondition.Clone();
            }
            else
            {
                filterCondition = null;
            }

            this.LoadConditionTreeView();
            OnFilterSet(usedColumns);

            this.cmbColumn.DataSource  = grid.RootTable.Columns;
            this.cmbColumn.ValueMember = "Caption";
        }
示例#9
0
        private void LoadAllRoad(string MaCungXN, int ProvinceID)
        {
            try
            {
                clsRoad           clsRoads = new clsRoad();
                List <RoadEntity> lstRoad  = clsRoads.GetAllRoadbyMAXN_ProvinceID(MaCungXN, ProvinceID);
                #region Update All Kinh Do - Vi Do
                //gridBaoCaoBieuMau1.DataSource = lstRoad;
                //float viDo = 0;
                //float kinhDo = 0;
                //string toaDo = "";
                //foreach (clsRoadEntity item in lstRoad)
                //{
                //    if (item.KinhDo > 0 && item.ViDo > 0) continue;

                //    toaDo = GetGeobyAddressBA2(item.NameVN);
                //    if (toaDo != "*" && toaDo != string.Empty)
                //    {
                //        string[] arrString = toaDo.Split(' ');
                //        float.TryParse(arrString[0], NumberStyles.AllowDecimalPoint ,new CultureInfo("vi-VN", true), out viDo);
                //        float.TryParse(arrString[1], NumberStyles.AllowDecimalPoint, new CultureInfo("vi-VN", true), out kinhDo);
                //    }

                //    new clsRoad().Update_TenVietTat(item.ID, item.VietTat, item.NameVN, item.NameEN, kinhDo, viDo);
                //}
                #endregion

                gridVietTatTenDuong.SetDataBinding(lstRoad, "ListRoad");

                GridEXFilterCondition Filter = new GridEXFilterCondition(gridVietTatTenDuong.RootTable.Columns["NameVN"], ConditionOperator.Equal, G_NameVN);

                if (gridVietTatTenDuong.Find(Filter, -1, 1))
                {
                    GridEXRow row = ((GridEXSelectedItem)gridVietTatTenDuong.SelectedItems[0]).GetRow();

                    GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                    RowStyle.BackColor = System.Drawing.Color.DodgerBlue;
                    row.RowStyle       = RowStyle;
                    //gridVietTatTenDuong.RootTable.ApplyFilter(ab);
                }
            }
            catch (Exception ex)
            {
                LogError.WriteLogError(this.Name, ex);
            }
        }
 public static ConditionSerializationContext Serialize(GridEXFilterCondition condition)
 {
     Logger.Log.DebugFormat("condition={0}", condition);
     JanusLayoutWriter writer = new JanusLayoutWriter();
     ((IJanusXmlLayoutsSupport)condition).Serialize(writer);
     ConditionSerializationContext context = new ConditionSerializationContext(string.Format("<{0}>{1}</{0}>", "FilterCondition", writer));
     if (condition.Column != null)
     {
         ColumnInfo tempLocal0 = new ColumnInfo
         {
             ColumnKey = condition.Column.Key,
             TableKey = condition.Column.Table.Key
         };
         ColumnInfo key = tempLocal0;
         context.AddColumnKey(key);
         SetContextColumns(context, condition.Conditions);
     }
     return context;
 }
    protected override void OnTextBoxTextChanged(EventArgs e)
    {
        GridEXFilterCondition internalFilter = new GridEXFilterCondition();

        String str = TextBox.Text;

        foreach (GridEXColumn column in DropDownList.Columns)
        {
            if (!column.Visible)
            {
                continue;
            }

            GridEXFilterCondition filterCondition = new GridEXFilterCondition(column, ConditionOperator.Contains, str);

            internalFilter.AddCondition(LogicalOperator.Or, filterCondition);
        }

        DropDownList.ApplyFilter(internalFilter);
    }
示例#12
0
        public static string FilterConditionToString(GridEXFilterCondition condition)
        {
            string result = null;

            if (condition != null)
            {
                if (condition.IsComposite)
                {
                    string operatorText;
                    if (condition.Conditions.Count > 1)
                    {
                        operatorText = condition.Conditions[1].LogicalOperator.ToString();
                    }
                    else
                    {
                        operatorText = condition.Conditions[0].LogicalOperator.ToString();
                    }

                    result  = "( ";
                    result += FilterConditionToString(condition.Conditions[0]);
                    for (int i = 1; i < condition.Conditions.Count; i++)
                    {
                        result += " " + operatorText + " " + FilterConditionToString(condition.Conditions[i]);
                    }
                    result += " )";
                }
                else
                {
                    if (condition.Column != null)
                    {
                        result = "([" + condition.Column.Caption + "] " + FilterOperatorListItem.FilterOperatorLabel(condition.ConditionOperator) + " " + condition.Value1.ToString() + ")";
                    }
                    else
                    {
                        result = "[VACIO]";
                    }
                }
            }

            return(result);
        }
示例#13
0
文件: GxFilter.cs 项目: Vocaoson/qlgx
        /// <summary>
        /// Lọc dữ liệu khi bắt đầu load data
        /// </summary>
        private void SetDefaultFilter()
        {
            try
            {
                if (FilterParameter != null && FilterParameter.Count > 0 && grdData != null)
                {
                    GridEXFilterCondition conditionsub;
                    GridEXFilterCondition condition = new GridEXFilterCondition();
                    int dem = 0;
                    foreach (KeyValuePair <object, object> arrCondition in FilterParameter)
                    {
                        conditionsub        = new GridEXFilterCondition();
                        conditionsub.Column = GrdData.RootTable.Columns[arrCondition.Key.ToString().Trim()];
                        conditionsub.Value1 = arrCondition.Value.ToString().Trim();

                        if (dem > 0)
                        {
                            condition.AddCondition(LogicalOperator.And, conditionsub);
                        }
                        else
                        {
                            condition = conditionsub;
                        }
                        dem = dem + 1;
                    }
                    condition.ConditionOperator   = ConditionOperator.Contains;
                    filterEditor1.FilterCondition = condition;
                    if (filterEditor1.FilterCondition != null)
                    {
                        filterEditor1.FilterCondition.ConditionOperator = Janus.Data.ConditionOperator.Contains;
                    }
                    filterEditor1.AutomaticHeightResize = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Lỗi Exception (GxFilter, SetDefaultFilter)", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void LoadAllRoad(string MaCungXN, int ProvinceID)
        {
            try
            {
                clsRoad           clsRoads = new clsRoad();
                List <RoadEntity> lstRoad  = clsRoads.GetAllRoadbyMAXN_ProvinceID(MaCungXN, ProvinceID);
                gridVietTatTenDuong.SetDataBinding(lstRoad, "ListRoad");
                GridEXFilterCondition Filter = new GridEXFilterCondition(gridVietTatTenDuong.RootTable.Columns["NameVN"], ConditionOperator.Equal, G_NameVN);

                if (gridVietTatTenDuong.Find(Filter, -1, 1))
                {
                    GridEXRow         row      = (gridVietTatTenDuong.SelectedItems[0]).GetRow();
                    GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                    RowStyle.BackColor = System.Drawing.Color.DodgerBlue;
                    row.RowStyle       = RowStyle;
                }
            }
            catch (Exception ex)
            {
                LogError.WriteLogError("LoadAllRoad: ", ex);
            }
        }
示例#15
0
        public void SetFilter(String value)
        {
            Janus.Windows.GridEX.GridEXFilterCondition cond = null;
            Janus.Windows.GridEX.GridEXSortKey         sort = null;
            Attribute[] columnAttributes = Attribute.GetCustomAttributes(persistentType);
            foreach (Attribute columnAttribute in columnAttributes)
            {
                if (columnAttribute is FilterColumnAttribute)
                {
                    cond                   = new GridEXFilterCondition();
                    cond.Column            = grdData.RootTable.Columns[(columnAttribute as FilterColumnAttribute).Name];
                    cond.Value1            = value;
                    cond.ConditionOperator = Janus.Windows.GridEX.ConditionOperator.Contains;

                    sort           = new GridEXSortKey();
                    sort.Column    = grdData.RootTable.Columns[(columnAttribute as FilterColumnAttribute).Name];
                    sort.SortOrder = Janus.Windows.GridEX.SortOrder.Ascending;
                }
            }

            if (value != String.Empty)
            {
                grdData.RootTable.ApplyFilter(cond);
                if (grdData.RowCount == 0)
                {
                    grdData.RootTable.ApplyFilter(null);
                }
            }
            else
            {
                grdData.RootTable.ApplyFilter(null);
            }


            grdData.RootTable.SortKeys.Clear();
            grdData.RootTable.SortKeys.Add(sort);
        }
示例#16
0
        private TreeNode FilterConditionToTreeNode(GridEXFilterCondition condition)
        {
            TreeNode result = null;

            if (condition != null)
            {
                result = new TreeNode();
                if (condition.IsComposite)
                {
                    if (condition.Conditions.Count > 1)
                    {
                        result.Text = condition.Conditions[1].LogicalOperator.ToString();
                    }
                    else
                    {
                        result.Text = condition.Conditions[0].LogicalOperator.ToString();
                    }
                    foreach (GridEXFilterCondition childCondition in condition.Conditions)
                    {
                        TreeNode childNode = FilterConditionToTreeNode(childCondition);
                        result.Nodes.Add(childNode);
                    }
                }
                else
                {
                    result.Text = GridUtils.FilterConditionToString(condition);
                    if (!usedColumns.Contains(condition.Column))
                    {
                        usedColumns.Add(condition.Column);
                    }
                }
                result.Tag = condition;
                result.Expand();
            }

            return(result);
        }
        private void SetSumTotalProperties()
        {
            try
            {
                if (objLuotkham == null)
                {
                    objLuotkham = CreatePatientExam();
                }
                GridEXColumn gridExColumntrangthaithanhtoan = getGridExColumn(grdThongTinChuaThanhToan, "trangthai_thanhtoan");
                GridEXColumn gridExColumn = getGridExColumn(grdThongTinChuaThanhToan, "TT_KHONG_PHUTHU");
                GridEXColumn gridExColumn_tutuc = getGridExColumn(grdThongTinChuaThanhToan, "TT_BN_KHONG_TUTUC");
                GridEXColumn gridExColumnTT = getGridExColumn(grdThongTinChuaThanhToan, "TT");
                GridEXColumn gridExColumnTT_chietkhau = getGridExColumn(grdThongTinChuaThanhToan, KcbThanhtoanChitiet.Columns.TienChietkhau);
                GridEXColumn gridExColumnBHYT = getGridExColumn(grdThongTinChuaThanhToan, "TT_BHYT");
                GridEXColumn gridExColumnTTBN = getGridExColumn(grdThongTinChuaThanhToan, "TT_BN");
                GridEXColumn gridExColumntutuc = getGridExColumn(grdThongTinChuaThanhToan, "tu_tuc");
                GridEXColumn gridExColumntrangthai_huy = getGridExColumn(grdThongTinChuaThanhToan, "trangthai_huy");
                GridEXColumn gridExColumnPhuThu = getGridExColumn(grdThongTinChuaThanhToan,
                    "TT_PHUTHU");
                var gridExFilterCondition_khong_Tutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditionTutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);
                var gridExFilterChuathanhtoan =
                    new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 0);
                var gridExFilterDathanhtoan =
                  new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 1);
                var gridExFilterCondition_TuTuc =
                   new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);

                var gridExFilterConditionKhongTuTuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy =
                    new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy_va_khongtutuc =
                   new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                gridExFilterConditiontrangthai_huy_va_khongtutuc.AddCondition(gridExFilterConditionKhongTuTuc);
                GridEXColumn gridExColumnBNCT = getGridExColumn(grdThongTinChuaThanhToan,
                    "bnhan_chitra");
                // Janus.Windows.GridEX.GridEXColumn gridExColumnTuTuc = getGridExColumn(grdThongTinChuaThanhToan, "bnhan_chitra");
                decimal BN_KHONGTUTUC =
                  Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumn_tutuc, AggregateFunction.Sum),
                      gridExFilterCondition_khong_Tutuc);
                decimal TT =
                    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTT, AggregateFunction.Sum),
                        gridExFilterConditiontrangthai_huy);
                decimal TT_Chietkhau =
                   Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTT_chietkhau, AggregateFunction.Sum),
                       gridExFilterConditiontrangthai_huy);

                decimal TT_KHONG_PHUTHU =
                   Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumn, AggregateFunction.Sum),
                       gridExFilterConditiontrangthai_huy);
                decimal TT_BHYT =
                    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnBHYT, AggregateFunction.Sum,
                        gridExFilterConditiontrangthai_huy));
                decimal TT_BN =
                    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                        gridExFilterConditiontrangthai_huy));
                decimal TT_BN_DaTT =
                   Utility.DecimaltoDbnull(grdThongTinDaThanhToan.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                       gridExFilterConditiontrangthai_huy));
                Chuathanhtoan =
                   Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                       gridExFilterChuathanhtoan));
                //Tạm bỏ
                //decimal PtramBHYT = 0;
                //_THANHTOAN.LayThongPtramBHYT(TongChiphiBHYT, objLuotkham, ref PtramBHYT);
                decimal PhuThu =
                    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnPhuThu, AggregateFunction.Sum));
                decimal TuTuc =
                    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnBNCT, AggregateFunction.Sum,
                        gridExFilterConditionTutuc));
                //txtPtramBHChiTra.Text = Utility.sDbnull(PtramBHYT);
                txtTongChiPhi.Text = Utility.sDbnull(TT);
                TT_KHONG_PHUTHU -= TuTuc;
                txtTongtienDCT.Text = objLuotkham.MaDoituongKcb == "DV" ? "0" : Utility.sDbnull( TT_BHYT  +BN_KHONGTUTUC);// objLuotkham.MaDoituongKcb == "DV" ? "0" : Utility.sDbnull(TT_KHONG_PHUTHU);
                txtPhuThu.Text = Utility.sDbnull(PhuThu);
                txtTuTuc.Text = Utility.sDbnull(TuTuc);
                //decimal BHCT = TongChiphiBHYT*PtramBHYT/100;
                txtBHCT.Text = Utility.sDbnull(TT_BHYT, "0");
                decimal BNCT = BN_KHONGTUTUC;
                txtBNCT.Text = Utility.sDbnull(BNCT);
                decimal BNPhaiTra = BNCT + Utility.DecimaltoDbnull(txtTuTuc.Text, 0) +
                                    Utility.DecimaltoDbnull(txtPhuThu.Text);
                txtBNPhaiTra.Text = Utility.sDbnull(TT_BN);
                txtSoTienCanNop.Text = Utility.sDbnull(Chuathanhtoan);
                //Tạm bỏ
                TinhToanSoTienPhaithu();
                ModifyCommand();
            }
            catch
            { }
        }
        private void SetSumTotalProperties()
        {
            try
            {

                GridEXColumn gridExColumntrangthaithanhtoan = getGridExColumn(grdChitiet, "trangthai_thanhtoan");
                GridEXColumn gridExColumn = getGridExColumn(grdChitiet, "TT_KHONG_PHUTHU");
                GridEXColumn gridExColumn_tutuc = getGridExColumn(grdChitiet, "TT_BN_KHONG_TUTUC");
                GridEXColumn gridExColumnTT = getGridExColumn(grdChitiet, "TT");
                GridEXColumn gridExColumnTT_chietkhau = getGridExColumn(grdChitiet, KcbThanhtoanChitiet.Columns.TienChietkhau);
                GridEXColumn gridExColumnBHYT = getGridExColumn(grdChitiet, "TT_BHYT");
                GridEXColumn gridExColumnTTBN = getGridExColumn(grdChitiet, "TT_BN");
                GridEXColumn gridExColumntutuc = getGridExColumn(grdChitiet, "tu_tuc");
                GridEXColumn gridExColumntrangthai_huy = getGridExColumn(grdChitiet, "trangthai_huy");
                GridEXColumn gridExColumnPhuThu = getGridExColumn(grdChitiet,
                    "TT_PHUTHU");
                var gridExFilterCondition_khong_Tutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditionTutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);
                var gridExFilterChuathanhtoan =
                    new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 0);
                var gridExFilterDathanhtoan =
                  new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 1);
                var gridExFilterCondition_TuTuc =
                   new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);

                var gridExFilterConditionKhongTuTuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy =
                    new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy_va_khongtutuc =
                   new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                gridExFilterConditiontrangthai_huy_va_khongtutuc.AddCondition(gridExFilterConditionKhongTuTuc);
                GridEXColumn gridExColumnBNCT = getGridExColumn(grdChitiet,
                    "bnhan_chitra");
                // Janus.Windows.GridEX.GridEXColumn gridExColumnTuTuc = getGridExColumn(grdChitiet, "bnhan_chitra");
                decimal BN_KHONGTUTUC =
                  Utility.DecimaltoDbnull(grdChitiet.GetTotal(gridExColumn_tutuc, AggregateFunction.Sum),
                      gridExFilterCondition_khong_Tutuc);
                decimal TT =
                    Utility.DecimaltoDbnull(grdChitiet.GetTotal(gridExColumnTT, AggregateFunction.Sum),
                        gridExFilterConditiontrangthai_huy);
                decimal TT_Chietkhau =
                   Utility.DecimaltoDbnull(grdChitiet.GetTotal(gridExColumnTT_chietkhau, AggregateFunction.Sum),
                       gridExFilterConditiontrangthai_huy);

                decimal TT_KHONG_PHUTHU =
                   Utility.DecimaltoDbnull(grdChitiet.GetTotal(gridExColumn, AggregateFunction.Sum),
                       gridExFilterConditiontrangthai_huy);
                decimal TT_BHYT =
                    Utility.DecimaltoDbnull(grdChitiet.GetTotal(gridExColumnBHYT, AggregateFunction.Sum,
                        gridExFilterConditiontrangthai_huy));
                decimal TT_BN =
                    Utility.DecimaltoDbnull(grdChitiet.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                        gridExFilterConditiontrangthai_huy));

                Chuathanhtoan =
                   Utility.DecimaltoDbnull(grdChitiet.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                       gridExFilterChuathanhtoan));
                //Tạm bỏ
                //decimal PtramBHYT = 0;
                //_THANHTOAN.LayThongPtramBHYT(TongChiphiBHYT, objLuotkham, ref PtramBHYT);
                decimal PhuThu =
                    Utility.DecimaltoDbnull(grdChitiet.GetTotal(gridExColumnPhuThu, AggregateFunction.Sum));
                decimal TuTuc =
                    Utility.DecimaltoDbnull(grdChitiet.GetTotal(gridExColumnBNCT, AggregateFunction.Sum,
                        gridExFilterConditionTutuc));
                //txtPtramBHChiTra.Text = Utility.sDbnull(PtramBHYT);

                TT_KHONG_PHUTHU -= TuTuc;

                decimal BNCT = BN_KHONGTUTUC;

                decimal BNPhaiTra = BNCT ;

                txtSoTienCanNop.Text = Utility.sDbnull(Chuathanhtoan);
                //Tạm bỏ
                TinhToanSoTienPhaithu();
                ModifyCommand();
            }
            catch
            { }
        }
示例#19
0
 private void RefreshFilterCondition()
 {
     if (conditionSerializationContext != null)
     {
         filterCondition = ConditionSerializer.Deserialize(conditionSerializationContext);
         filterConditionString = filterCondition.ToString();
     }
 }
示例#20
0
 private int GetMatches(GridEXFilterCondition condition, ref List<SVNLogEntry> logEntries, ICollection<SVNPath> paths)
 {
     int matchesCount = UpdatesGrid.FindAll(condition);
     logEntries = new List<SVNLogEntry>();
     if (matchesCount == 0)
     {
         return 0;
     }
     foreach (GridEXSelectedItem item in UpdatesGrid.SelectedItems)
     {
         object dataRow = item.GetRow().DataRow;
         if (dataRow is SVNLogEntry)
         {
             logEntries.Add((SVNLogEntry)dataRow);
         }
         else if (dataRow is SVNPath)
         {
             paths.Add((SVNPath)dataRow);
         }
         else
         {
             Debugger.Launch();
         }
     }
     return matchesCount;
 }
示例#21
0
        private void SetSumTotalProperties()
        {
            try
            {
                GridEXColumn gridExColumntrangthaithanhtoan = getGridExColumn(grdPaymentDetail, "trangthai_thanhtoan");
                GridEXColumn gridExColumn              = getGridExColumn(grdPaymentDetail, "TT_KHONG_PHUTHU");
                GridEXColumn gridExColumn_tutuc        = getGridExColumn(grdPaymentDetail, "TT_BN_KHONG_TUTUC");
                GridEXColumn gridExColumnTT            = getGridExColumn(grdPaymentDetail, "TT");
                GridEXColumn gridExColumnTT_chietkhau  = getGridExColumn(grdPaymentDetail, KcbThanhtoanChitiet.Columns.TienChietkhau);
                GridEXColumn gridExColumnBHYT          = getGridExColumn(grdPaymentDetail, "TT_BHYT");
                GridEXColumn gridExColumnTTBN          = getGridExColumn(grdPaymentDetail, "TT_BN");
                GridEXColumn gridExColumntutuc         = getGridExColumn(grdPaymentDetail, "tu_tuc");
                GridEXColumn gridExColumntrangthai_huy = getGridExColumn(grdPaymentDetail, "trangthai_huy");
                GridEXColumn gridExColumnPhuThu        = getGridExColumn(grdPaymentDetail,
                                                                         "TT_PHUTHU");
                var gridExFilterCondition_khong_Tutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditionTutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);
                var gridExFilterChuathanhtoan =
                    new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 0);
                var gridExFilterDathanhtoan =
                    new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 1);
                var gridExFilterCondition_TuTuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);

                var gridExFilterConditionKhongTuTuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy =
                    new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy_va_khongtutuc =
                    new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                gridExFilterConditiontrangthai_huy_va_khongtutuc.AddCondition(gridExFilterConditionKhongTuTuc);
                GridEXColumn gridExColumnBNCT = getGridExColumn(grdPaymentDetail,
                                                                "bnhan_chitra");
                // Janus.Windows.GridEX.GridEXColumn gridExColumnTuTuc = getGridExColumn(grdPaymentDetail, "bnhan_chitra");
                decimal BN_KHONGTUTUC =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumn_tutuc, AggregateFunction.Sum),
                                            gridExFilterCondition_khong_Tutuc);
                decimal TT =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnTT, AggregateFunction.Sum),
                                            gridExFilterConditiontrangthai_huy);
                decimal TT_Chietkhau =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnTT_chietkhau, AggregateFunction.Sum),
                                            gridExFilterConditiontrangthai_huy);

                decimal TT_KHONG_PHUTHU =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumn, AggregateFunction.Sum),
                                            gridExFilterConditiontrangthai_huy);
                decimal TT_BHYT =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnBHYT, AggregateFunction.Sum,
                                                                      gridExFilterConditiontrangthai_huy));
                decimal TT_BN =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                                                                      gridExFilterConditiontrangthai_huy));

                Chuathanhtoan =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                                                                      gridExFilterChuathanhtoan));
                //Tạm bỏ
                //decimal PtramBHYT = 0;
                //_THANHTOAN.LayThongPtramBHYT(TongChiphiBHYT, objLuotkham, ref PtramBHYT);
                decimal PhuThu =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnPhuThu, AggregateFunction.Sum));
                decimal TuTuc =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnBNCT, AggregateFunction.Sum,
                                                                      gridExFilterConditionTutuc));
                //txtPtramBHChiTra.Text = Utility.sDbnull(PtramBHYT);
                txtTongChiPhi.Text  = Utility.sDbnull(TT);
                TT_KHONG_PHUTHU    -= TuTuc;
                txtTongtienDCT.Text = objLuotkham.MaDoituongKcb == "DV" ? "0" : Utility.sDbnull(TT_BHYT + BN_KHONGTUTUC);// objLuotkham.MaDoituongKcb == "DV" ? "0" : Utility.sDbnull(TT_KHONG_PHUTHU);
                txtPhuThu.Text      = Utility.sDbnull(PhuThu);
                txtTuTuc.Text       = Utility.sDbnull(TuTuc);
                //decimal BHCT = TongChiphiBHYT*PtramBHYT/100;
                txtBHCT.Text = Utility.sDbnull(TT_BHYT, "0");
                decimal BNCT = BN_KHONGTUTUC;
                txtBNCT.Text = Utility.sDbnull(BNCT);
                decimal BNPhaiTra = BNCT + Utility.DecimaltoDbnull(txtTuTuc.Text, 0) +
                                    Utility.DecimaltoDbnull(txtPhuThu.Text);
                txtBNPhaiTra.Text = Utility.sDbnull(TT_BN);

                KcbThanhtoanCollection _item = new KcbThanhtoanController().FetchByID(v_Payment_Id);
                if (!_item.Any())
                {
                    txtsotiendathu.Text = "0";
                    txtDachietkhau.Text = "0";
                }
                else
                {
                    txtDachietkhau.Text = _item.FirstOrDefault().TongtienChietkhau.ToString();
                    txtsotiendathu.Text = (Utility.DecimaltoDbnull(_item.FirstOrDefault().BnhanChitra, 0)
                                           + Utility.DecimaltoDbnull(_item.FirstOrDefault().PhuThu, 0)
                                           + Utility.DecimaltoDbnull(_item.FirstOrDefault().TuTuc, 0)
                                           - Utility.DecimaltoDbnull(txtDachietkhau.Text, 0)).ToString();
                }
                ModifyCommand();
            }
            catch
            { }
        }
        private void SetSumTotalProperties()
        {
            try
            {
                if (objLuotkham == null)
                {
                    objLuotkham = Utility.getKcbLuotkham(Utility.Int64Dbnull(txtPatient_ID.Text), Utility.DoTrim(txtPatient_Code.Text));
                }
                GridEXColumn gridExColumntrangthaithanhtoan = getGridExColumn(grdThongTinChuaThanhToan, "trangthai_thanhtoan");
                GridEXColumn gridExColumn = getGridExColumn(grdThongTinChuaThanhToan, "TT_KHONG_PHUTHU");
                GridEXColumn gridExColumn_tutuc = getGridExColumn(grdThongTinChuaThanhToan, "TT_BN_KHONG_TUTUC");
                GridEXColumn gridExColumnTT = getGridExColumn(grdThongTinChuaThanhToan, "TT");
                GridEXColumn gridExColumnTT_chietkhau = getGridExColumn(grdThongTinChuaThanhToan, KcbThanhtoanChitiet.Columns.TienChietkhau);
                GridEXColumn gridExColumnBHYT = getGridExColumn(grdThongTinChuaThanhToan, "TT_BHYT");
                GridEXColumn gridExColumnTTBN = getGridExColumn(grdThongTinChuaThanhToan, "TT_BN");
                GridEXColumn gridExColumntutuc = getGridExColumn(grdThongTinChuaThanhToan, "tu_tuc");
                GridEXColumn gridExColumntrangthai_huy = getGridExColumn(grdThongTinChuaThanhToan, "trangthai_huy");
                GridEXColumn gridExColumnPhuThu = getGridExColumn(grdThongTinChuaThanhToan,
                    "TT_PHUTHU");
                var gridExFilterCondition_khong_Tutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditionTutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);
                var gridExFilterChuathanhtoan =
                    new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 0);
                var gridExFilterDathanhtoan =
                  new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 1);
                var gridExFilterCondition_TuTuc =
                   new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);

                var gridExFilterConditionKhongTuTuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy =
                    new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy_va_khongtutuc =
                   new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                gridExFilterConditiontrangthai_huy_va_khongtutuc.AddCondition(gridExFilterConditionKhongTuTuc);
                GridEXColumn gridExColumnBNCT = getGridExColumn(grdThongTinChuaThanhToan,"bnhan_chitra");
                // Janus.Windows.GridEX.GridEXColumn gridExColumnTuTuc = getGridExColumn(grdThongTinChuaThanhToan, "bnhan_chitra");

                //decimal BN_KHONGTUTUC =
                //  Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumn_tutuc, AggregateFunction.Sum,
                //      gridExFilterCondition_khong_Tutuc));
                //decimal TT =
                //    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTT, AggregateFunction.Sum,gridExFilterConditiontrangthai_huy));
                //decimal TT_Chietkhau =
                //   Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTT_chietkhau, AggregateFunction.Sum,
                //       gridExFilterConditiontrangthai_huy));

                //decimal TT_KHONG_PHUTHU =
                //   Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumn, AggregateFunction.Sum,
                //       gridExFilterConditiontrangthai_huy));
                //decimal TT_BHYT =
                //    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnBHYT, AggregateFunction.Sum,
                //        gridExFilterConditiontrangthai_huy));
                //decimal TT_BN =
                //    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                //        gridExFilterConditiontrangthai_huy));
                //decimal TT_BN_DaTT =
                //   Utility.DecimaltoDbnull(grdThongTinDaThanhToan.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                //       gridExFilterConditiontrangthai_huy));
                //Chuathanhtoan =
                //   Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                //       gridExFilterChuathanhtoan));

                ////Tạm bỏ
                ////decimal PtramBHYT = 0;
                ////_THANHTOAN.LayThongPtramBHYT(TongChiphiBHYT, objLuotkham, ref PtramBHYT);
                //decimal PhuThu =
                //    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnPhuThu, AggregateFunction.Sum));
                //decimal TuTuc =
                //    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnBNCT, AggregateFunction.Sum,
                //        gridExFilterConditionTutuc));

                decimal BN_KHONGTUTUC = 0m;
                decimal TT = 0m;
                decimal TT_Chietkhau = 0m;

                decimal TT_KHONG_PHUTHU = 0m;
                decimal TT_BHYT = 0m;
                decimal TT_BN = 0m;
                decimal TT_BN_DaTT = 0m;
                Chuathanhtoan = 0m;

                //Tạm bỏ
                //decimal PtramBHYT = 0;
                //_THANHTOAN.LayThongPtramBHYT(TongChiphiBHYT, objLuotkham, ref PtramBHYT);
                decimal PhuThu = 0m;
                decimal TuTuc = 0m;
                foreach (DataRowView drv in m_dtChiPhiThanhtoan.DefaultView)
                {
                    if (Utility.Int32Dbnull(drv["tinh_chiphi"], 0) == 1)
                    {
                        if (Utility.Int32Dbnull(drv["tu_tuc"], 0) == 0)
                            BN_KHONGTUTUC += Utility.DecimaltoDbnull(drv["TT_BN_KHONG_TUTUC"], 0);
                        if (Utility.Int32Dbnull(drv["trangthai_huy"], 0) == 0)
                        {
                            TT += Utility.DecimaltoDbnull(drv["TT"], 0);
                            TT_Chietkhau += Utility.DecimaltoDbnull(drv[KcbThanhtoanChitiet.Columns.TienChietkhau], 0);
                            TT_KHONG_PHUTHU += Utility.DecimaltoDbnull(drv["TT_KHONG_PHUTHU"], 0);

                            TT_BHYT += Utility.DecimaltoDbnull(drv["TT_BHYT"], 0);
                            TT_BN += Utility.DecimaltoDbnull(drv["TT_BN"], 0);
                            TT_BN_DaTT += Utility.DecimaltoDbnull(drv["TT_BN"], 0);
                        }
                        if (Utility.Int32Dbnull(drv["trangthai_thanhtoan"], 0) == 0)
                            Chuathanhtoan += Utility.DecimaltoDbnull(drv["TT_BN"], 0);
                        PhuThu += Utility.DecimaltoDbnull(drv["TT_PHUTHU"], 0);
                        if (Utility.Int32Dbnull(drv["tu_tuc"], 0) == 1)
                            TuTuc += Utility.DecimaltoDbnull(drv["TT_TUTUC"], 0);
                    }
                }
                //txtPtramBHChiTra.Text = Utility.sDbnull(PtramBHYT);
                txtTongChiPhi.Text = Utility.sDbnull(TT);
                TT_KHONG_PHUTHU -= TuTuc;
                txtTongtienDCT.Text = objLuotkham.MaDoituongKcb == "DV" ? "0" : Utility.sDbnull( TT_BHYT  +BN_KHONGTUTUC);// objLuotkham.MaDoituongKcb == "DV" ? "0" : Utility.sDbnull(TT_KHONG_PHUTHU);
                txtPhuThu.Text = Utility.sDbnull(PhuThu);
                txtTuTuc.Text = Utility.sDbnull(TuTuc);
                //decimal BHCT = TongChiphiBHYT*PtramBHYT/100;
                txtBHCT.Text = Utility.sDbnull(TT_BHYT, "0");
                decimal BNCT = BN_KHONGTUTUC;
                txtBNCT.Text = Utility.sDbnull(BNCT);
                decimal BNPhaiTra = BNCT + Utility.DecimaltoDbnull(txtTuTuc.Text, 0) +
                                    Utility.DecimaltoDbnull(txtPhuThu.Text);
                txtBNPhaiTra.Text = Utility.sDbnull(TT_BN);
                txtSoTienCanNop.Text = Utility.sDbnull(Chuathanhtoan);
                //Tạm bỏ
                TinhToanSoTienPhaithu();
                ModifyCommand();
            }
            catch
            { }
        }
        private void SetSumTotalProperties()
        {
            try
            {
                GridEXColumn gridExColumntrangthaithanhtoan = getGridExColumn(grdPaymentDetail, "trangthai_thanhtoan");
                GridEXColumn gridExColumn = getGridExColumn(grdPaymentDetail, "TT_KHONG_PHUTHU");
                GridEXColumn gridExColumn_tutuc = getGridExColumn(grdPaymentDetail, "TT_BN_KHONG_TUTUC");
                GridEXColumn gridExColumnTT = getGridExColumn(grdPaymentDetail, "TT");
                GridEXColumn gridExColumnTT_chietkhau = getGridExColumn(grdPaymentDetail, KcbThanhtoanChitiet.Columns.TienChietkhau);
                GridEXColumn gridExColumnBHYT = getGridExColumn(grdPaymentDetail, "TT_BHYT");
                GridEXColumn gridExColumnTTBN = getGridExColumn(grdPaymentDetail, "TT_BN");
                GridEXColumn gridExColumntutuc = getGridExColumn(grdPaymentDetail, "tu_tuc");
                GridEXColumn gridExColumntrangthai_huy = getGridExColumn(grdPaymentDetail, "trangthai_huy");
                GridEXColumn gridExColumnPhuThu = getGridExColumn(grdPaymentDetail,
                    "TT_PHUTHU");
                var gridExFilterCondition_khong_Tutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditionTutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);
                var gridExFilterChuathanhtoan =
                    new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 0);
                var gridExFilterDathanhtoan =
                  new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 1);
                var gridExFilterCondition_TuTuc =
                   new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);

                var gridExFilterConditionKhongTuTuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy =
                    new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy_va_khongtutuc =
                   new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                gridExFilterConditiontrangthai_huy_va_khongtutuc.AddCondition(gridExFilterConditionKhongTuTuc);
                GridEXColumn gridExColumnBNCT = getGridExColumn(grdPaymentDetail,
                    "bnhan_chitra");
                // Janus.Windows.GridEX.GridEXColumn gridExColumnTuTuc = getGridExColumn(grdPaymentDetail, "bnhan_chitra");
                decimal BN_KHONGTUTUC =
                  Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumn_tutuc, AggregateFunction.Sum),
                      gridExFilterCondition_khong_Tutuc);
                decimal TT =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnTT, AggregateFunction.Sum),
                        gridExFilterConditiontrangthai_huy);
                decimal TT_Chietkhau =
                   Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnTT_chietkhau, AggregateFunction.Sum),
                       gridExFilterConditiontrangthai_huy);

                decimal TT_KHONG_PHUTHU =
                   Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumn, AggregateFunction.Sum),
                       gridExFilterConditiontrangthai_huy);
                decimal TT_BHYT =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnBHYT, AggregateFunction.Sum,
                        gridExFilterConditiontrangthai_huy));
                decimal TT_BN =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                        gridExFilterConditiontrangthai_huy));

                Chuathanhtoan =
                   Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                       gridExFilterChuathanhtoan));
                //Tạm bỏ
                //decimal PtramBHYT = 0;
                //_THANHTOAN.LayThongPtramBHYT(TongChiphiBHYT, objLuotkham, ref PtramBHYT);
                decimal PhuThu =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnPhuThu, AggregateFunction.Sum));
                decimal TuTuc =
                    Utility.DecimaltoDbnull(grdPaymentDetail.GetTotal(gridExColumnBNCT, AggregateFunction.Sum,
                        gridExFilterConditionTutuc));
                //txtPtramBHChiTra.Text = Utility.sDbnull(PtramBHYT);
                txtTongChiPhi.Text = Utility.sDbnull(TT);
                TT_KHONG_PHUTHU -= TuTuc;
                txtTongtienDCT.Text = "0";
                txtPhuThu.Text = Utility.sDbnull(PhuThu);
                txtTuTuc.Text = Utility.sDbnull(TuTuc);
                //decimal BHCT = TongChiphiBHYT*PtramBHYT/100;
                txtBHCT.Text = Utility.sDbnull(TT_BHYT, "0");
                decimal BNCT = BN_KHONGTUTUC;
                txtBNCT.Text = Utility.sDbnull(BNCT);
                decimal BNPhaiTra = BNCT + Utility.DecimaltoDbnull(txtTuTuc.Text, 0) +
                                    Utility.DecimaltoDbnull(txtPhuThu.Text);
                txtBNPhaiTra.Text = Utility.sDbnull(TT_BN);

                KcbThanhtoanCollection _item = new KcbThanhtoanController().FetchByID(v_Payment_Id);
                if (!_item.Any())
                {
                    txtsotiendathu.Text = "0";
                    txtDachietkhau.Text = "0";
                }
                else
                {
                    txtDachietkhau.Text = _item.FirstOrDefault().TongtienChietkhau.ToString();
                    txtsotiendathu.Text = (Utility.DecimaltoDbnull(_item.FirstOrDefault().BnhanChitra, 0)
                        + Utility.DecimaltoDbnull(_item.FirstOrDefault().PhuThu, 0)
                        + Utility.DecimaltoDbnull(_item.FirstOrDefault().TuTuc, 0)
                        - Utility.DecimaltoDbnull(txtDachietkhau.Text, 0)).ToString();
                }
                ModifyCommand();
            }
            catch
            { }
        }
示例#24
0
 internal override void RejectChanges()
 {
     base.RejectChanges();
     conditionSerializationContext = rejectionConditionSerializationContext;
     RejectActionsChanges();
     filterCondition = null;
     RefreshFilterCondition();
 }
示例#25
0
        private void ApplyTribunalMemberFilter()
        {
            // code to apply filter criteria to memmebrs list
            if (CurrentRow() != null)
            {
                grexAppealsReadyForAssignment.DropDowns["ddMemberListAssignmentFilter"].ApplyFilter(null); // clear filter

                GridEXFilterCondition filtTribunalMember = new GridEXFilterCondition();

                if (this.chkLanguage.Checked) // add language filter
                {
                    if (CurrentRow().FileLanguageCode == "F")
                    {
                        filtTribunalMember.AddCondition(new GridEXFilterCondition(grexAppealsReadyForAssignment.DropDowns["ddMemberListAssignmentFilter"].Columns["CanHearFre"],
                                                                                  ConditionOperator.Equal, true));
                    }
                    else if (CurrentRow().FileLanguageCode == "E")
                    {
                        filtTribunalMember.AddCondition(new GridEXFilterCondition(grexAppealsReadyForAssignment.DropDowns["ddMemberListAssignmentFilter"].Columns["CanHearEng"],
                                                                                  ConditionOperator.Equal, true));
                    }
                    else
                    {
                        filtTribunalMember.AddCondition(new GridEXFilterCondition(grexAppealsReadyForAssignment.DropDowns["ddMemberListAssignmentFilter"].Columns["CanHearFre"],
                                                                                  ConditionOperator.Equal, true));
                        filtTribunalMember.AddCondition(new GridEXFilterCondition(grexAppealsReadyForAssignment.DropDowns["ddMemberListAssignmentFilter"].Columns["CanHearEng"],
                                                                                  ConditionOperator.Equal, true));
                    }
                }

                if (this.chkTraining.Checked) // add training filter
                {
                    // charter condition
                    if (CurrentRow().IsCharter)
                    {
                        filtTribunalMember.AddCondition(new GridEXFilterCondition(grexAppealsReadyForAssignment.DropDowns["ddMemberListAssignmentFilter"].Columns["TrainedCharter"],
                                                                                  ConditionOperator.Equal, true));
                    }

                    // program & benefit condition
                    if (!CurrentRow().IsAccountIdNull())
                    {
                        atLogic.ObjectBE obe = myAtMng.GetCodeTableBE("AccountType");
                        if (obe.myDT.Rows.Count == 0)
                        {
                            obe.Load();
                        }
                        CodesDB.AccountTypeDataTable atdt = (CodesDB.AccountTypeDataTable)obe.myDT;
                        CodesDB.AccountTypeRow       atr  = atdt.FindByAccountTypeId(CurrentRow().AccountId);

                        string trainedByProgramColumn = "";

                        switch (atr.ProgramID)
                        {
                        case 3:     // EI
                            trainedByProgramColumn = "TrainedEI";
                            break;

                        case 8:     // CPP
                            trainedByProgramColumn = "TrainedCPP";
                            break;

                        case 9:     // OAS
                            trainedByProgramColumn = "TrainedOAS";
                            break;
                        }

                        if (trainedByProgramColumn != "")
                        {
                            filtTribunalMember.AddCondition(new GridEXFilterCondition(grexAppealsReadyForAssignment.DropDowns["ddMemberListAssignmentFilter"].Columns[trainedByProgramColumn],
                                                                                      ConditionOperator.Equal, true));
                        }
                    }
                }

                if (this.chkLocation.Checked) // add location filter
                {
                    var memberId = new List <int>();

                    if (!CurrentRow().IsOfficeIdNull())
                    {
                        int selectedSCOfficeId = CurrentRow().OfficeId;

                        // get service centre latitude and longitude
                        lmDatasets.MemberManagement.OfficeSCListRow scr = myMemMng.DB.OfficeSCList.FindByOfficeId(selectedSCOfficeId);// myAtMng.OfficeMng.GetServiceCentre().Load(selectedSCOfficeId);

                        if (!scr.IsLatitudeNull() && !scr.IsLongitudeNull())
                        {
                            // get member postal code
                            double distance;

                            maxDistance = (int)maxDistanceEditBox.Value;

                            foreach (MemberManagement.MemberListAssignmentFilterRow mlafr in mListAssignmentFilter)
                            {
                                if (!mlafr.IsLatitudeNull())
                                {
                                    distance = myAtMng.GetPostalCodeLocation().CalculateDistance((double)mlafr.Latitude, (double)mlafr.Longitude, (double)scr.Latitude, (double)scr.Longitude);
                                    if (distance >= 0 && distance <= maxDistance)
                                    {
                                        memberId.Add(mlafr.OfficerId);
                                    }
                                }
                            }
                        }
                    }

                    if (memberId.Count == 0)
                    {
                        memberId.Add(-1);
                    }

                    GridEXFilterCondition filtLocation = new GridEXFilterCondition();
                    foreach (int memID in memberId)
                    {
                        if (filtLocation.Conditions.Count == 0)
                        {
                            filtLocation.AddCondition(new GridEXFilterCondition(grexAppealsReadyForAssignment.DropDowns["ddMemberListAssignmentFilter"].Columns["OfficerId"], ConditionOperator.Equal, memID));
                        }
                        else
                        {
                            filtLocation.AddCondition(LogicalOperator.Or, new GridEXFilterCondition(grexAppealsReadyForAssignment.DropDowns["ddMemberListAssignmentFilter"].Columns["OfficerId"], ConditionOperator.Equal, memID));
                        }
                    }
                    filtTribunalMember.AddCondition(filtLocation);
                }

                // apply filter only if conditions exist
                if (filtTribunalMember.Conditions.Count > 0)
                {
                    grexAppealsReadyForAssignment.DropDowns["ddMemberListAssignmentFilter"].ApplyFilter(filtTribunalMember);
                }
            }
        }
示例#26
0
 private void gridVietTatTenDuong_FilterApplied(object sender, EventArgs e)
 {
     GridEXFilterCondition a = gridVietTatTenDuong.RootTable.FilterApplied;
 }
示例#27
0
        private void btnAddCondition_Click(object sender, EventArgs e)
        {
            if ((cmbColumn.SelectedItem == null) || (cmbFilterOperator.SelectedItem == null))
            {
                return;
            }

            if (filterCondition == null)
            {
                filterCondition = new GridEXFilterCondition();
            }
            LogicalOperator logicalOperator;

            if (this.rbtAnd.Checked)
            {
                logicalOperator = LogicalOperator.And;
            }
            else
            {
                logicalOperator = LogicalOperator.Or;
            }

            GridEXFilterCondition cond = null;

            if (tbcCondition.SelectedTab == tbpCondition)
            {
                cond = new GridEXFilterCondition((GridEXColumn)this.cmbColumn.SelectedItem, ((FilterOperatorListItem)this.cmbFilterOperator.SelectedItem).Operator, this.GetFilterValue());
            }
            else if (tbcCondition.SelectedTab == tbpMultiSelectList)
            {
                IList list = multiSelectList.SelectedItems;

                cond = new GridEXFilterCondition();
                GridEXFilterCondition childCondition;

                cond.AddCondition(new GridEXFilterCondition((GridEXColumn)this.cmbColumn.SelectedItem, ConditionOperator.Equal, list[0]));
                for (int i = 1; i < list.Count; i++)
                {
                    childCondition = new GridEXFilterCondition((GridEXColumn)this.cmbColumn.SelectedItem, ConditionOperator.Equal, list[i]);
                    cond.AddCondition(LogicalOperator.Or, childCondition);
                }
            }
            else
            {
                return;
            }

            if ((this.trvFilterCondition.Nodes.Count > 0) && (this.trvFilterCondition.SelectedNode != null) && (this.trvFilterCondition.SelectedNode.Parent != null))
            {
                GridEXFilterCondition parentCondition, siblingCondition, compositeCondition;
                siblingCondition = (GridEXFilterCondition)this.trvFilterCondition.SelectedNode.Tag;
                parentCondition  = (GridEXFilterCondition)this.trvFilterCondition.SelectedNode.Parent.Tag;
                if ((parentCondition.Conditions.Count == 1) || (parentCondition.Conditions[1].LogicalOperator == logicalOperator))
                {
                    parentCondition.AddCondition(logicalOperator, cond);
                }
                else
                {
                    LogicalOperator auxLogicalOperator = parentCondition.Conditions[1].LogicalOperator;
                    parentCondition.RemoveCondition(siblingCondition);
                    compositeCondition = new GridEXFilterCondition();
                    compositeCondition.AddCondition(siblingCondition);
                    compositeCondition.AddCondition(logicalOperator, cond);
                    parentCondition.AddCondition(auxLogicalOperator, compositeCondition);
                }
            }
            else
            {
                filterCondition.AddCondition(logicalOperator, cond);
            }
            this.LoadConditionTreeView();
        }
示例#28
0
        private void grd_List_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (Char.IsLetter(e.KeyChar))
            {
                if (Char.IsLetterOrDigit(e.KeyChar))
                {
                        mabenh = Utility.sDbnull(e.KeyChar);

                        var querymabenh = from benh in grd_List.GetDataRows()
                                    where Utility.sDbnull(benh.Cells[DmucBenh.Columns.MaBenh].Value).Contains(mabenh)
                                          || Utility.sDbnull(benh.Cells[DmucBenh.Columns.MaBenh].Value).EndsWith(mabenh)
                                          || Utility.sDbnull(benh.Cells[DmucBenh.Columns.MaBenh].Value).StartsWith(mabenh)
                                    select Utility.sDbnull(benh.Cells[DmucBenh.Columns.MaBenh].Value);

                        if (querymabenh.Any())
                        {
                            Utility.GotoNewRowJanus(grd_List, DmucBenh.Columns.MaBenh, querymabenh.FirstOrDefault());
                        }

                        var query = from benh in grd_List.GetDataRows()
                                    where Utility.sDbnull(benh.Cells[DmucBenh.Columns.TenBenh].Value).Contains(mabenh)
                                          || Utility.sDbnull(benh.Cells[DmucBenh.Columns.TenBenh].Value).EndsWith(mabenh)
                                          || Utility.sDbnull(benh.Cells[DmucBenh.Columns.TenBenh].Value).StartsWith(mabenh)
                                    select Utility.sDbnull(benh.Cells[DmucBenh.Columns.MaBenh].Value);
                        if (query.Any())
                        {
                            Utility.GotoNewRowJanus(grd_List, DmucBenh.Columns.MaBenh, query.FirstOrDefault());
                        }
                    Janus.Windows.GridEX.GridEXColumn gridExColumn =
                        grd_List.RootTable.Columns[DmucBenh.Columns.TenBenh];
                    Janus.Windows.GridEX.GridEXFilterCondition gridExFilterCondition = new GridEXFilterCondition(gridExColumn, ConditionOperator.Contains, mabenh);
                    grd_List.Find(gridExFilterCondition,1,-1);

                }
            }
        }
        private void SetSumTotalProperties()
        {
            try
            {
                if (objLuotkham == null)
                {
                    objLuotkham = Utility.getKcbLuotkham(Utility.Int64Dbnull(txtPatient_ID.Text), Utility.DoTrim(txtPatient_Code.Text));
                }
                string ErrMsg = "";
                decimal newBHYT = Utility.DecimaltoDbnull(txtPtramBHChiTra.Text, 0);
                _THANHTOAN.TinhlaitienBHYTtruocThanhtoan(m_dtChiPhiThanhtoan, TaophieuThanhtoan(), objLuotkham, Taodulieuthanhtoanchitiet(ref ErrMsg), ref newBHYT);
                txtPtramBHChiTra.Text = newBHYT.ToString();
                GridEXColumn gridExColumntrangthaithanhtoan = getGridExColumn(grdThongTinChuaThanhToan, "trangthai_thanhtoan");
                GridEXColumn gridExColumn = getGridExColumn(grdThongTinChuaThanhToan, "TT_KHONG_PHUTHU");
                GridEXColumn gridExColumn_tutuc = getGridExColumn(grdThongTinChuaThanhToan, "TT_BN_KHONG_TUTUC");
                GridEXColumn gridExColumnTT = getGridExColumn(grdThongTinChuaThanhToan, "TT");
                GridEXColumn gridExColumnTT_chietkhau = getGridExColumn(grdThongTinChuaThanhToan, KcbThanhtoanChitiet.Columns.TienChietkhau);
                GridEXColumn gridExColumnBHYT = getGridExColumn(grdThongTinChuaThanhToan, "TT_BHYT");
                GridEXColumn gridExColumnTTBN = getGridExColumn(grdThongTinChuaThanhToan, "TT_BN");
                GridEXColumn gridExColumntutuc = getGridExColumn(grdThongTinChuaThanhToan, "tu_tuc");
                GridEXColumn gridExColumntrangthai_huy = getGridExColumn(grdThongTinChuaThanhToan, "trangthai_huy");
                GridEXColumn gridExColumnPhuThu = getGridExColumn(grdThongTinChuaThanhToan,
                    "TT_PHUTHU");
                var gridExFilterCondition_khong_Tutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditionTutuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);
                var gridExFilterChuathanhtoan =
                    new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 0);
                var gridExFilterDathanhtoan =
                  new GridEXFilterCondition(gridExColumntrangthaithanhtoan, ConditionOperator.Equal, 1);
                var gridExFilterCondition_TuTuc =
                   new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 1);

                var gridExFilterConditionKhongTuTuc =
                    new GridEXFilterCondition(gridExColumntutuc, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy =
                    new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                var gridExFilterConditiontrangthai_huy_va_khongtutuc =
                   new GridEXFilterCondition(gridExColumntrangthai_huy, ConditionOperator.Equal, 0);
                gridExFilterConditiontrangthai_huy_va_khongtutuc.AddCondition(gridExFilterConditionKhongTuTuc);
                GridEXColumn gridExColumnBNCT = getGridExColumn(grdThongTinChuaThanhToan,"bnhan_chitra");
                // Janus.Windows.GridEX.GridEXColumn gridExColumnTuTuc = getGridExColumn(grdThongTinChuaThanhToan, "bnhan_chitra");

                //decimal BN_KHONGTUTUC =
                //  Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumn_tutuc, AggregateFunction.Sum,
                //      gridExFilterCondition_khong_Tutuc));
                //decimal TT =
                //    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTT, AggregateFunction.Sum,gridExFilterConditiontrangthai_huy));
                //decimal TT_Chietkhau =
                //   Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTT_chietkhau, AggregateFunction.Sum,
                //       gridExFilterConditiontrangthai_huy));

                //decimal TT_KHONG_PHUTHU =
                //   Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumn, AggregateFunction.Sum,
                //       gridExFilterConditiontrangthai_huy));
                //decimal TT_BHYT =
                //    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnBHYT, AggregateFunction.Sum,
                //        gridExFilterConditiontrangthai_huy));
                //decimal TT_BN =
                //    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                //        gridExFilterConditiontrangthai_huy));
                //decimal TT_BN_DaTT =
                //   Utility.DecimaltoDbnull(grdThongTinDaThanhToan.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                //       gridExFilterConditiontrangthai_huy));
                //Chuathanhtoan =
                //   Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnTTBN, AggregateFunction.Sum,
                //       gridExFilterChuathanhtoan));

                ////Tạm bỏ
                ////decimal PtramBHYT = 0;
                ////_THANHTOAN.LayThongPtramBHYT(TongChiphiBHYT, objLuotkham, ref PtramBHYT);
                //decimal PhuThu =
                //    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnPhuThu, AggregateFunction.Sum));
                //decimal TuTuc =
                //    Utility.DecimaltoDbnull(grdThongTinChuaThanhToan.GetTotal(gridExColumnBNCT, AggregateFunction.Sum,
                //        gridExFilterConditionTutuc));

                decimal BN_KHONGTUTUC = 0m;
                decimal TT = 0m;
                decimal TT_Chietkhau = 0m;

                decimal TT_KHONG_PHUTHU = 0m;
                decimal TT_BHYT = 0m;
                decimal TT_BN = 0m;
                decimal TT_BN_DaTT = 0m;
                Chuathanhtoan = 0m;

                //Tạm bỏ
                //decimal PtramBHYT = 0;
                //_THANHTOAN.LayThongPtramBHYT(TongChiphiBHYT, objLuotkham, ref PtramBHYT);
                decimal PhuThu = 0m;
                decimal TuTuc = 0m;
                foreach (DataRowView drv in m_dtChiPhiThanhtoan.DefaultView)
                {
                    if (Utility.Int32Dbnull(drv["tinh_chiphi"], 0) == 1)
                    {
                        if (Utility.Int32Dbnull(drv["tu_tuc"], 0) == 0)
                            BN_KHONGTUTUC += Utility.DecimaltoDbnull(drv["TT_BN_KHONG_TUTUC"], 0);
                        if (Utility.Int32Dbnull(drv["trangthai_huy"], 0) == 0)
                        {
                            TT += Utility.DecimaltoDbnull(drv["TT"], 0);
                            TT_Chietkhau += Utility.DecimaltoDbnull(drv[KcbThanhtoanChitiet.Columns.TienChietkhau], 0);
                            TT_KHONG_PHUTHU += Utility.DecimaltoDbnull(drv["TT_KHONG_PHUTHU"], 0);

                            TT_BHYT += Utility.DecimaltoDbnull(drv["TT_BHYT"], 0);
                            TT_BN += Utility.DecimaltoDbnull(drv["TT_BN"], 0);
                            TT_BN_DaTT += Utility.DecimaltoDbnull(drv["TT_BN"], 0);
                        }
                        if (Utility.Int32Dbnull(drv["trangthai_thanhtoan"], 0) == 0)
                            Chuathanhtoan += Utility.DecimaltoDbnull(drv["TT_BN"], 0);
                        PhuThu += Utility.DecimaltoDbnull(drv["TT_PHUTHU"], 0);
                        if (Utility.Int32Dbnull(drv["tu_tuc"], 0) == 1)
                            TuTuc += Utility.DecimaltoDbnull(drv["TT_TUTUC"], 0);
                    }
                }
                txtTongChiPhi.Text = Utility.sDbnull(TT);
                TT_KHONG_PHUTHU -= TuTuc;
                txtTongtienDCT.Text = objLuotkham.MaDoituongKcb == "DV" ? "0" : Utility.sDbnull( TT_BHYT  +BN_KHONGTUTUC);// objLuotkham.MaDoituongKcb == "DV" ? "0" : Utility.sDbnull(TT_KHONG_PHUTHU);
                txtPhuThu.Text = Utility.sDbnull(PhuThu);
                txtTuTuc.Text = Utility.sDbnull(TuTuc);
                //decimal BHCT = TongChiphiBHYT*PtramBHYT/100;
                txtBHCT.Text = Utility.sDbnull(TT_BHYT, "0");
                decimal BNCT = BN_KHONGTUTUC;
                txtBNCT.Text = Utility.sDbnull(BNCT);
                decimal BNPhaiTra = BNCT + Utility.DecimaltoDbnull(txtTuTuc.Text, 0) +
                                    Utility.DecimaltoDbnull(txtPhuThu.Text);
                txtBNPhaiTra.Text = Utility.sDbnull(TT_BN);
                TinhToanSoTienPhaithu();
                decimal Tong_Tamung = 0;
                if (ucTamung1.m_dtTamung != null)
                {
                    Tong_Tamung = Utility.DecimaltoDbnull(ucTamung1.m_dtTamung.Compute("SUM(so_tien)", "1=1"), 0);
                    if (Math.Abs(Tong_Tamung) != 0)
                    {
                        decimal chenhlech = Chuathanhtoan - Tong_Tamung;
                        if (cmdHoanung.Tag.ToString() == "1")//Đã hoàn ứng
                            chenhlech = 0;
                        if (chenhlech > 0)
                        {
                            lblThuathieu.Text = "BN Nộp tiền";
                            txtThuathieu.Text = chenhlech.ToString();
                        }
                        else
                        {
                            lblThuathieu.Text = "Trả lại BN";
                            txtThuathieu.Text = Math.Abs(chenhlech).ToString();
                        }
                    }
                }

                if (Tong_Tamung == 0)
                {
                    lblThuathieu.Text = "BN Nộp tiền";
                    txtThuathieu.Text = txtSoTienCanNop.Text;
                }
                ModifyCommand();
            }
            catch
            { }
        }
示例#30
0
 private void btnCleanFilter_Click(object sender, EventArgs e)
 {
     filterCondition = null;
     this.LoadConditionTreeView();
 }