Beispiel #1
0
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtORDER_TYPE, "订单类型不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtORDER_NO, "订单号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtEBP_CODE, "电商平台不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtEBC_CODE, "电商企业不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtGOODS_VALUE, "商品价格不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtFREIGHT, "运杂费不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtDISCOUNT, "非现金抵扣金额不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtTAXTOTAL, "代扣税款不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtACTURAL_PAID, "实际支付金额不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCURRENCY, "币制不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtBUYER_REGNO, "订购人注册号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtBUYER_NAME, "订购人姓名不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtBUYER_TELEPHONE, "订购人电话不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtBUYER_ID_TYPE, "订购人证件类型不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtBUYER_ID_NUMBER, "订购人证件号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCONSIGNEE, "收货人姓名不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCONSIGNEE_TELEPHONE, "收货人电话不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCONSIGNEE_ADDRESS, "收货人地址不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCONSIGNEE_DITRICT, "收货人行政区不能为空!");

            Validate = Validate & !gv_Detail_CU_I_ORDER_LIST.HasColumnErrors & gv_Detail_CU_I_ORDER_LIST.ValidateEditor();
            ;


            return(Validate);
        }
    private void OnGUI()
    {
        EditorGUILayout.LabelField("软件名");
        ProductName = EditorGUILayout.TextField(ProductName);

        EditorGUILayout.LabelField("发行商");
        CompanyName = EditorGUILayout.TextField(CompanyName);

        EditorGUILayout.LabelField("标签(用英文,进行分隔)");
        Classifies = EditorGUILayout.TextField(Classifies);

        EditorGUILayout.LabelField(@"描述(注意换行的\n)");
        Description = EditorGUILayout.TextField(Description);

        EditorGUILayout.LabelField("文件位置");
        FilePath = EditorGUILayout.TextField(FilePath);

        GUILayout.Space(10);
        if (GUILayout.Button("创建软件本地文件夹"))
        {
            LibraryTools.CreateProductInfoDir
                (ProductName,
                CompanyName,
                Classifies,
                Description,
                FilePath);
        }
    }
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtAccount, "账号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtPassword, "密码不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txxtPassword, "确认密码不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtUserName, "名称不能为空!");

            if (Validate == true)
            {
                if (!Object.Equals(txtPassword.EditValue, txxtPassword.EditValue))
                {
                    Msg.Warning("两次密码输入不一致,请重新输入!");
                    Validate = false;
                }
            }
            if (Validate == true)
            {
                //密码字段加密
                DataRow row = EditData.Tables[_bll.SummaryModel.TableName].Rows[0];

                if (row.HasVersion(DataRowVersion.Proposed))//只有修改之后的密码字段才进行加密
                {
                    if (!object.ReferenceEquals(row[dt_MyUser.Password, DataRowVersion.Current], row[dt_MyUser.Password, DataRowVersion.Proposed]))
                    {
                        row[dt_MyUser.Password] = Encrypt.DESEncrypt(row[dt_MyUser.Password].ToString());
                    }
                }
                txxtPassword.EditValue = EditData.Tables[_bll.SummaryModel.TableName].Rows[0][dt_MyUser.Password];
            }
            return(Validate);
        }
Beispiel #4
0
        //绑定明细页数据
        public override void DoBoundEditData()
        {
            //base.DoBoundEditData();
            LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");
            this.gc_Detail_CU_I_DECLFORM_LIST.DataSource = EditData.Tables[CU_I_DECLFORM_LIST._TableName];
            this.gv_Detail_CU_I_DECLFORM_LIST.BestFitColumns();

            //数据绑定,两个地方任选一处都可以
            EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_DECLFORM_HEAD.BUYER_ID_TYPE] = CU_CERT_TYPE.CU_CERT_TYPE_1;
            EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_DECLFORM_HEAD.CURRENCY]      = CU_CURRENCY.CU_CURRENCY_142;

            if (CurrentDataState == FormDataState.Add)
            {
                EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_DECLFORM_HEAD.GUID]   = BillNoGenerator.NewDeclformBillNo();
                EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_DECLFORM_HEAD.COP_NO] = BillNoGenerator.NewDeclformCopNo();
                Library.DataBinderTools.Bound.DoBindingEntity(EditData.Tables[_bll.SummaryModel.TableName].Rows[0]);

                this.txtBUYER_ID_TYPE.EditValue = CU_CERT_TYPE.CU_CERT_TYPE_1;
                this.txtCURRENCY.EditValue      = CU_CURRENCY.CU_CURRENCY_142;
            }

            //其他绑定
            //LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");
            //txxtPassword.EditValue = EditData.Tables[_bll.SummaryTableName].Rows[0][dt_MyUser.Password];
            //gc_Detail.DataSource = EditData.Tables[dt_MyUserRole._TableName];
        }
        //public override void DoCancel(object sender)
        //{
        //    CurrentDataState = FormDataState.View;
        //    if (_SummaryView.RowCount > 0)

        //        DoView(null);
        //    else
        //    {
        //        tc_Data.SelectedTabPage = tp_Search;
        //        tp_Edit.PageEnabled = false;
        //    }
        //    //base.DoCancel(sender);
        //}

        public override void DoBoundEditData()
        {
            //选择节点
            LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");



            tree_Module.EditData = EditData.Tables[dt_MyRoleAuthority._TableName];
        }
Beispiel #6
0
        //保存前检查
        protected bool ValidateBeforSave()
        {
            bool Validate = true;

            Validate = LibraryTools.IsNotEmpBaseEdit(txtLOGISTICS_NO, "物流运单编号不能为空!")
            ;

            return(Validate);
        }
Beispiel #7
0
        //绑定明细页数据
        public override void DoBoundEditData()
        {
            //base.DoBoundEditData();
            LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");

            //其他绑定
            //LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");
            //txxtPassword.EditValue = EditData.Tables[_bll.SummaryTableName].Rows[0][dt_MyUser.Password];
            //gc_Detail.DataSource = EditData.Tables[dt_MyUserRole._TableName];
        }
Beispiel #8
0
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtCustomerName, "客户名称不能为空!");

            ;


            return(Validate);
        }
Beispiel #9
0
        private void btn_OK_Click(object sender, EventArgs e)
        {
            bool b = LibraryTools.IsNotEmpBaseEdit(txtItemNo, "货号不能为空!");

            if (b == false)
            {
                return;
            }
            Data = new DataTable();
            Data.Columns.Add(nameof(tb_PODetail.ItemNo), typeof(System.String));
            Data.Columns.Add(nameof(tb_PODetail.ItemName), typeof(System.String));
            Data.Columns.Add(nameof(tb_PODetail.CategoryID), typeof(System.String));
            Data.Columns.Add(nameof(tb_PODetail.POPrice), typeof(System.Decimal));
            Data.Columns.Add(nameof(tb_PODetail.SOPrice), typeof(System.Decimal));
            Data.Columns.Add(nameof(tb_PODetail.Color), typeof(System.String));
            Data.Columns.Add(nameof(tb_PODetail.Size), typeof(System.String));
            Data.Columns.Add(nameof(tb_PODetail.Qty), typeof(System.Int16));
            Data.Columns.Add(nameof(tb_PODetail.TotalPOAmount), typeof(System.Decimal));
            foreach (DataRow row in dtQty.Rows)
            {
                string color = ConvertLib.ToString(row["Color"]);
                for (int i = 0; i < dtSize.Rows.Count; i++)
                {
                    string fileName = "Qty_" + (i + 1);
                    int    qty      = ConvertLib.ToInt(row[fileName]);
                    if (qty > 0)
                    {
                        DataRow dr = Data.NewRow();


                        dr[tb_PODetail.ItemNo] = txtItemNo.EditValue;
                        if (!String.IsNullOrEmpty(ConvertLib.ToString(txtItemName.EditValue)))
                        {
                            dr[tb_PODetail.ItemName] = txtItemName.EditValue;
                        }
                        dr[tb_PODetail.CategoryID] = txtCategory.EditValue;
                        if (!String.IsNullOrEmpty(ConvertLib.ToString(txtPOPrice.EditValue)))
                        {
                            dr[tb_PODetail.POPrice] = txtPOPrice.EditValue;
                        }
                        if (!String.IsNullOrEmpty(ConvertLib.ToString(txtSOPrice.EditValue)))
                        {
                            dr[tb_PODetail.SOPrice] = txtSOPrice.EditValue;
                        }
                        dr[tb_PODetail.Color]         = color;
                        dr[tb_PODetail.Size]          = dtSize.Rows[i]["DataName"];
                        dr[tb_PODetail.Qty]           = qty;
                        dr[tb_PODetail.TotalPOAmount] = ConvertLib.ToDecimal(txtPOPrice.EditValue, 0) * qty;
                        Data.Rows.Add(dr);
                    }
                }
            }
            Data.AcceptChanges();
            this.DialogResult = DialogResult.OK;
        }
Beispiel #10
0
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtAccount, "账号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtPassword, "密码不能为空!");

            ;


            return(Validate);
        }
Beispiel #11
0
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtSupplierName, "供应商名称不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtZJM, "助记码不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtStatus, "状态不能为空!");

            ;


            return(Validate);
        }
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtSPID, "仓位编号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtStorage, "仓库标识不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtPosition, "仓位标识不能为空!");

            ;


            return(Validate);
        }
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtMaterial, "材质不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtProductName, "产品名称不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtZJM, "助记码不能为空!");

            ;


            return(Validate);
        }
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtCustomerID, "客户编号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCustomerName, "客户名称不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtZJM, "助记码不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtContacts, "联系人不能为空!");

            ;


            return(Validate);
        }
 /// <summary>
 /// 重置按钮状态,因为在SetEditModel设置了启用按钮编辑功能,针对ControlOnlyReads和SetControlAccessable重新设置其状态
 /// </summary>
 protected void SetControlCommonAccessable()
 {
     foreach (Control col in ControlOnlyReads)
     {
         LibraryTools.SetControlAccessable(col, false);
     }
     if (CurrentDataState == FormDataState.Edit)
     {
         foreach (Control col in ControlKeys)
         {
             LibraryTools.SetControlAccessable(col, false);
         }
     }
 }
Beispiel #16
0
 //绑定明细页数据
 public override void DoBoundEditData()
 {
     //base.DoBoundEditData();
     LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");
     this.gc_Detail_tb_PODetail.DataSource = EditData.Tables[tb_PODetail._TableName];
     if (this.CurrentDataState == GZFramework.UI.Core.FormDataState.Add)
     {
         EditData.Tables[_bll.SummaryModel.TableName].Rows[0][tb_PO.DocDate] = DateTime.Now;
     }
     //其他绑定
     //LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");
     //txxtPassword.EditValue = EditData.Tables[_bll.SummaryTableName].Rows[0][dt_MyUser.Password];
     //gc_Detail.DataSource = EditData.Tables[dt_MyUserRole._TableName];
 }
Beispiel #17
0
        //绑定明细页数据
        public override void DoBoundEditData()
        {
            //base.DoBoundEditData();
            LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");
            this.gc_Detail_CU_I_DELIVERY_LIST.DataSource = EditData.Tables[CU_I_DELIVERY_LIST._TableName];
            this.gv_Detail_CU_I_DELIVERY_LIST.BestFitColumns();

            //数据绑定,两个地方任选一处都可以
            if (CurrentDataState == FormDataState.Add)
            {
                EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_DELIVERY_HEAD.GUID]   = BillNoGenerator.NewDeliveryBillGUID();
                EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_DELIVERY_HEAD.COP_NO] = BillNoGenerator.NewDeclformCopNo();
                Library.DataBinderTools.Bound.DoBindingEntity(EditData.Tables[_bll.SummaryModel.TableName].Rows[0]);
            }
        }
Beispiel #18
0
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtCOP_NO, "内部编号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtORDER_NO, "订单编号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtEBP_CODE, "电商平台不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtEBC_CODE, "电商企业不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtLOGISTICS_NO, "运单编号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtLOGISTICS_CODE, "物流企业不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtASSURE_CODE, "担保企业不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtDECL_TIME, "申报日期不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCUSTOMS_CODE, "申报海关不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtPORT_CODE, "口岸海关不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtBUYER_ID_TYPE, "订购人证件类型不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtBUYER_ID_NUMBER, "订购人证件号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtBUYER_NAME, "订购人姓名不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtBUYER_TELEPHONE, "订购人电话不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCONSIGNEE_ADDRESS, "收件地址不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtAGENT_CODE, "申报企业不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtTRADE_MODE, "贸易方式不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtTRAF_MODE, "运输方式不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCOUNTRY, "起运国不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtFREIGHT, "运费不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtINSURED_FEE, "保费不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCURRENCY, "币值不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtPACK_NO, "件数不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtGROSS_WEIGHT, "毛重不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtNET_WEIGHT, "净重不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtIE_DATE, "进出口日期不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtWRAP_TYPE, "包装种类代码不能为空!");

            if (txtTRADE_MODE.EditValue.ToString() == CU_TRADE_MODE.CU_TRADE_MODE_1210)
            {
                Validate = Validate & LibraryTools.IsNotEmpBaseEdit(txtEMS_NO, "账册编号(保税)不能为空!")
                           & LibraryTools.IsNotEmpBaseEdit(txtAREA_CODE, "区内企业(保税)不能为空!");
            }
            if (txtTRADE_MODE.EditValue.ToString() == CU_TRADE_MODE.CU_TRADE_MODE_9610)
            {
                Validate = Validate & LibraryTools.IsNotEmpBaseEdit(txtTRAF_MODE, "运输工具编号(直购)不能为空!")
                           & LibraryTools.IsNotEmpBaseEdit(txtVOYAGE_NO, "航班航次(直购)不能为空!")
                           & LibraryTools.IsNotEmpBaseEdit(txtBILL_NO, "提运单号(直购)不能为空!");
            }
            Validate = Validate & !gv_Detail_CU_I_DECLFORM_LIST.HasColumnErrors & gv_Detail_CU_I_DECLFORM_LIST.ValidateEditor();
            ;


            return(Validate);
        }
Beispiel #19
0
        //保存前检查
        protected bool ValidateBeforSave()
        {
            bool Validate = true;

            Validate = LibraryTools.IsNotEmpBaseEdit(txtITEM_NAME, "商品名称不能为空!")
                       & LibraryTools.IsNotEmpBaseEdit(txtUNIT, "单位不能为空!")
                       & LibraryTools.IsNotEmpBaseEdit(txtQTY, "数量不能为空!")
                       & LibraryTools.IsNotEmpBaseEdit(txtPRICE, "单价不能为空!")
                       & LibraryTools.IsNotEmpBaseEdit(txtTOTAL_PRICE, "总价不能为空!")
                       & LibraryTools.IsNotEmpBaseEdit(txtCURRENCY, "币制不能为空!")
                       & LibraryTools.IsNotEmpBaseEdit(txtCOUNTRY, "原产国不能为空!")
                       & LibraryTools.IsNotEmpBaseEdit(txtG_MODEL, "规格型号不能为空!")
            ;

            return(Validate);
        }
Beispiel #20
0
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtLOGISTICS_NO, "运单编号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtFREIGHT, "运费不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtINSURE_FEE, "保价费不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCURRENCY, "币值不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtWEIGHT, "毛重不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtPACK_NO, "件数不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCONSIGNEE, "收货人姓名不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCONSIGNEE_ADDRESS, "收货地址不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtORDER_NO, "订单编号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCONSIGNEE_TELEPHONE, "收货人电话不能为空!");

            ;
            return(Validate);
        }
Beispiel #21
0
        //结算
        private void btn_Complete_Click(object sender, EventArgs e)
        {
            //Msg.ShowInformation("结算");
            bool validate = LibraryTools.IsNotEmpBaseEdit(txt_Sale, "销售员不能为空!");

            if (validate == false)
            {
                Msg.Warning("请检查必填项");
                return;
            }
            decimal      Amount = ConvertLib.ToDecimal(gcTotalAmount.SummaryItem.SummaryValue, 0);
            decimal      AmountIn = 0, AmountOut = 0;
            DialogResult result = frmDailogSalePay.ShowForm(Amount, out AmountIn, out AmountOut);

            //frmDailogSalePay frm = new Dialog.frmDailogSalePay();
            //frm.Amount = Amount;
            //DialogResult result = frm.ShowDialog();
            if (result != DialogResult.OK)
            {
                return;
            }

            DataRow row = EditData.Tables[tb_SO._TableName].Rows.Add();

            row[tb_SO.DocDate]     = bll.GetServerTime();
            row[tb_SO.SaleBy]      = txt_Sale.EditValue;
            row[tb_SO.TotalQty]    = gcQty.SummaryItem.SummaryValue;
            row[tb_SO.TotalAmount] = row[tb_SO.TotalPrice] = Amount;
            row[tb_SO.AmountIn]    = AmountIn;
            row[tb_SO.AmountOut]   = AmountOut;
            foreach (DataRow dr in EditData.Tables[tb_SODetail._TableName].Rows)
            {
                dr[tb_SODetail.SaleBy] = txt_Sale.EditValue;
            }
            bool success = bll.Update(EditData);

            if (success == true)
            {
                EditData.Tables[tb_SO._TableName].Rows.Clear();
                EditData.Tables[tb_SODetail._TableName].Rows.Clear();
                EditData.AcceptChanges();
                refreshTotalMsg();
            }
        }
Beispiel #22
0
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtCUSTOMS_CODE, "申报海关代码不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCOP_NO, "企业内部编号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtOPERATOR_CODE, "监管场所经营人代码不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtIE_FLAG, "进出口标记不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtTRAF_MODE, "运输方式不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtTRAF_NO, "运输工具编号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtVOYAGE_NO, "航班航次号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtBILL_NO, "提运单号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtLOGISTICS_CODE, "物流企业代码不能为空!");

            Validate = Validate & !gv_Detail_CU_I_DELIVERY_LIST.HasColumnErrors & gv_Detail_CU_I_DELIVERY_LIST.ValidateEditor();
            ;


            return(Validate);
        }
Beispiel #23
0
        //绑定明细页数据
        public override void DoBoundEditData()
        {
            //base.DoBoundEditData();
            LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");

            EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_WAYBILL_HEAD.CURRENCY] = CU_CURRENCY.CU_CURRENCY_142;

            if (CurrentDataState == FormDataState.Add)
            {
                EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_WAYBILL_HEAD.GUID] = BillNoGenerator.NewWayBillNo();
                Library.DataBinderTools.Bound.DoBindingEntity(EditData.Tables[_bll.SummaryModel.TableName].Rows[0]);

                this.txtCURRENCY.EditValue = CU_CURRENCY.CU_CURRENCY_142;
            }
            //其他绑定
            //LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");
            //txxtPassword.EditValue = EditData.Tables[_bll.SummaryTableName].Rows[0][dt_MyUser.Password];
            //gc_Detail.DataSource = EditData.Tables[dt_MyUserRole._TableName];
        }
Beispiel #24
0
        //保存前检查
        protected override bool ValidateBeforSave()
        {
            bool Validate = true
                            & LibraryTools.IsNotEmpBaseEdit(txtPAY_CODE, "支付企业不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtPAY_TRANSACTION_ID, "支付交易流水号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtORDER_NO, "订单编号不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtEBP_CODE, "电商平台不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtPAYER_ID_TYPE, "支付人证件类型不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtPAYER_ID_NUMBER, "支付人证件号码不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtPAYER_NAME, "支付人姓名不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtAMOUNT_PAID, "支付金额不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtCURRENCY, "支付币制不能为空!")
                            & LibraryTools.IsNotEmpBaseEdit(txtPAY_TIME, "支付时间不能为空!");

            ;


            return(Validate);
        }
Beispiel #25
0
        //绑定明细页数据
        public override void DoBoundEditData()
        {
            //base.DoBoundEditData();
            LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");
            this.gc_Detail_CU_I_ORDER_LIST.DataSource = EditData.Tables[CU_I_ORDER_LIST._TableName];
            this.gv_Detail_CU_I_ORDER_LIST.BestFitColumns();
            //数据绑定,两个地方任选一处都可以
            EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_ORDER_HEAD.BUYER_ID_TYPE] = CU_CERT_TYPE.CU_CERT_TYPE_1;
            EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_ORDER_HEAD.CURRENCY]      = CU_CURRENCY.CU_CURRENCY_142;
            EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_ORDER_HEAD.ORDER_TYPE]    = Type_FLAG.Type_FLAG_I;

            if (CurrentDataState == FormDataState.Add)
            {
                EditData.Tables[_bll.SummaryModel.TableName].Rows[0][CU_I_ORDER_HEAD.GUID] = BillNoGenerator.NewOrderBillNo();
                Library.DataBinderTools.Bound.DoBindingEntity(EditData.Tables[_bll.SummaryModel.TableName].Rows[0]);

                this.txtBUYER_ID_TYPE.EditValue = CU_CERT_TYPE.CU_CERT_TYPE_1;
                this.txtCURRENCY.EditValue      = CU_CURRENCY.CU_CURRENCY_142;
                this.txtORDER_TYPE.EditValue    = Type_FLAG.Type_FLAG_I;
            }
        }
Beispiel #26
0
 //清空条件
 private void btn_Clear_Click(object sender, EventArgs e)
 {
     LibraryTools.DoClearPanel(LC_Search);
 }
 protected override void SetControlAccessable(bool Edit)
 {
     LibraryTools.SetControlAccessable(tp_Edit, Edit);
     base.SetControlAccessable(Edit);
 }
 /// <summary>
 /// 绑定数据
 /// </summary>
 /// <param name="KeyValue"></param>
 public virtual void DoBoundEditData()
 {
     LibraryTools.DoBindingEditorPanel(pan_Summary, EditData.Tables[_bll.SummaryModel.TableName], "txt");
 }