Beispiel #1
0
        void DataRowTemplate_EditEnded(object sender, EventArgs e)
        {
            Xceed.Grid.DataRow row = sender as Xceed.Grid.DataRow;
            if (row.Cells["费用项"].Value != null)
            {
                if (row.Cells["费用项"].Value.ToString() == "011")
                {
                    ArchiveDetailForm detailForm = ArchiveFormFactory.GenerateArchiveDetailForm(ADInfoBll.Instance.GetWindowInfo("资金票据_凭证_会计付款_固定资产"));
                    if (detailForm != null)
                    {
                        detailForm.ControlManager.AddNew();
                        detailForm.UpdateContent();
                        detailForm.DisplayManager.DataControls["购入金额"].SelectedDataValue = row.Cells["金额"].Value;
                        Hd.Model.Kj.固定资产 entity = detailForm.DisplayManager.CurrentItem as Hd.Model.Kj.固定资产;
                        if (this.DisplayManager.DataControls["日期"].SelectedDataValue != null)
                        {
                            entity.购入时间 = (DateTime)this.DisplayManager.DataControls["日期"].SelectedDataValue;
                        }
                        else
                        {
                            entity.购入时间 = System.DateTime.Today;
                        }

                        detailForm.ShowDialog();
                    }
                }
                else if (row.Cells["费用项"].Value.ToString() == "012")
                {
                    ArchiveDataControlForm form = ServiceProvider.GetService <IWindowFactory>().CreateWindow(ADInfoBll.Instance.GetWindowInfo("资金票据_凭证_会计付款_结算期限")) as ArchiveDataControlForm;
                    if (form != null)
                    {
                        if (form.ShowDialog() == DialogResult.OK)
                        {
                            row.Cells["结算期限"].Value = form.DataControls["结算期限"].SelectedDataValue;
                            row.Cells["业务分类"].Value = form.DataControls["业务分类"].SelectedDataValue;
                        }
                    }
                }
            }
        }
Beispiel #2
0
        public static Dictionary <string, object> 自动凭证应付对账单(对账单 entity)
        {
            Dictionary <string, object> dict  = new Dictionary <string, object>();
            IList <GridColumnInfo>      infos = new List <GridColumnInfo> {
                new GridColumnInfo {
                    Caption = "凭证金额", DataControlDefaultValue = entity.金额.Value.ToString("N2"), DataControlVisible = "True", DataControlType = "MyCurrencyTextBox", PropertyName = "凭证金额", NotNull = "True"
                },
                new GridColumnInfo {
                    Caption = "凭证币制编号", DataControlDefaultValue = "CNT", DataControlVisible = "True", DataControlType = "MyComboTextBox", PropertyName = "凭证币制编号", CellEditorManagerParam = "财务_币制", NotNull = "True"
                }
            };
            ArchiveDataControlForm form = new ArchiveDataControlForm(new ControlManager((ISearchManager)null), infos);

            if (form.ShowDialog() == DialogResult.OK)
            {
                dict["凭证金额"]   = form.DataControls["凭证金额"].SelectedDataValue;
                dict["凭证币制编号"] = form.DataControls["凭证币制编号"].SelectedDataValue;
            }
            else
            {
                throw new InvalidUserOperationException("必须要填写会计金额和币制!");
            }
            return(dict);
        }