コード例 #1
0
 /// <summary>
 /// 加载销售计划信息和配件信息
 /// </summary>
 /// <param name="sale_billing_id"></param>
 private void LoadInfo(string sale_billing_id)
 {
     if (!string.IsNullOrEmpty(sale_billing_id))
     {
         //1.查看一条销售开单信息
         DataTable dt = DBHelper.GetTable("查看一条销售开单信息", "tb_parts_sale_billing", "*", " sale_billing_id='" + sale_billing_id + "'", "", "");
         if (dt != null && dt.Rows.Count > 0)
         {
             CommonFuncCall.SetModlByDataTable(tb_salebill_Model, dt);
             CommonFuncCall.SetShowControlValue(this, tb_salebill_Model, "");
             if (!string.IsNullOrEmpty(lblorder_date.Text))
             {
                 long ticks = Convert.ToInt64(lblorder_date.Text);
                 lblorder_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
             }
             if (!string.IsNullOrEmpty(lblreceivables_date.Text))
             {
                 long ticks = Convert.ToInt64(lblreceivables_date.Text);
                 lblreceivables_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
             }
             lblcreate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_salebill_Model.create_time.ToString())).ToString();
             if (tb_salebill_Model.update_time > 0)
             {
                 lblupdate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_salebill_Model.update_time.ToString())).ToString();
             }
         }
     }
 }
コード例 #2
0
 /// <summary> 加载主单据信息
 /// </summary>
 /// <param name="planId"></param>
 private void LoadInfo(string planId)
 {
     if (!string.IsNullOrEmpty(planId))
     {
         //1.加载供应商档案主信息
         DataTable dt = DBHelper.GetTable("查看一条采购计划单信息", "tb_parts_purchase_plan", "*", " plan_id='" + planId + "'", "", "");
         if (dt != null && dt.Rows.Count > 0)
         {
             CommonFuncCall.SetModlByDataTable(tb_purchase_Model, dt);
             CommonFuncCall.SetShowControlValue(this, tb_purchase_Model, "");
             chkis_suspend.Checked = tb_purchase_Model.is_suspend == "0";//选中(中止):0,未选中(不中止):1
             if (!string.IsNullOrEmpty(lblorder_date.Text))
             {
                 long ticks = Convert.ToInt64(lblorder_date.Text);
                 lblorder_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
             }
             if (!string.IsNullOrEmpty(lblplan_start_time.Text))
             {
                 long ticks = Convert.ToInt64(lblplan_start_time.Text);
                 lblplan_start_time.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
             }
             if (!string.IsNullOrEmpty(lblplan_end_time.Text))
             {
                 long ticks = Convert.ToInt64(lblplan_end_time.Text);
                 lblplan_end_time.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
             }
             lblcreate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_purchase_Model.create_time.ToString())).ToString();
             if (tb_purchase_Model.update_time > 0)
             {
                 lblupdate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_purchase_Model.update_time.ToString())).ToString();
             }
         }
     }
 }
コード例 #3
0
 /// <summary>
 /// 加载销售计划信息和配件信息
 /// </summary>
 /// <param name="sale_billing_id"></param>
 private void LoadInfo(string sale_billing_id)
 {
     if (!string.IsNullOrEmpty(sale_billing_id))
     {
         //1.查看一条销售开单信息
         DataTable dt = DBHelper.GetTable("查看一条销售开单信息", "tb_parts_sale_billing", "*", " sale_billing_id='" + sale_billing_id + "'", "", "");
         if (dt != null && dt.Rows.Count > 0)
         {
             CommonFuncCall.SetModlByDataTable(tb_salebill_Model, dt);
             CommonFuncCall.SetShowControlValue(this, tb_salebill_Model, "");
             if (!string.IsNullOrEmpty(lblorder_date.Text))
             {
                 long ticks = Convert.ToInt64(lblorder_date.Text);
                 lblorder_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
             }
             if (!string.IsNullOrEmpty(lblreceivables_date.Text))
             {
                 long ticks = Convert.ToInt64(lblreceivables_date.Text);
                 lblreceivables_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
             }
             lblcreate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_salebill_Model.create_time.ToString())).ToString();
             if (tb_salebill_Model.update_time > 0)
             {
                 lblupdate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_salebill_Model.update_time.ToString())).ToString();
             }
             orderstatus = tb_salebill_Model.order_status;
             if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.SUBMIT).ToString())
             {
                 //已提交状态屏蔽提交、编辑、删除按钮
                 base.btnSubmit.Enabled     = false;
                 base.btnEdit.Enabled       = false;
                 base.btnDelete.Enabled     = false;
                 base.btnActivation.Enabled = false;
             }
             else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.AUDIT).ToString())
             {
                 //已审核时屏蔽提交、审核、编辑、删除按钮
                 base.btnSubmit.Enabled     = false;
                 base.btnVerify.Enabled     = false;
                 base.btnEdit.Enabled       = false;
                 base.btnDelete.Enabled     = false;
                 base.btnActivation.Enabled = false;
             }
             else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.NOTAUDIT).ToString() || orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.DRAFT).ToString())
             {
                 //审核没通过时屏蔽审核按钮
                 base.btnVerify.Enabled = false;
             }
             else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.Invalid).ToString())
             {
                 base.btnActivation.Caption = "激活";
                 base.btnSubmit.Enabled     = false;
                 base.btnVerify.Enabled     = false;
                 base.btnEdit.Enabled       = false;
             }
         }
     }
 }
コード例 #4
0
 public void LoadControlInfo(tb_parts_purchase_order_2 yt_purchaseorder_model)
 {
     CommonFuncCall.SetShowControlValue(this, yt_purchaseorder_model, "View");
     if (!string.IsNullOrEmpty(lblreq_delivery_time.Text))
     {
         long ticks = Convert.ToInt64(lblreq_delivery_time.Text);
         lblreq_delivery_time.Text = Convert.ToDateTime(Common.UtcLongToLocalDateTime(ticks).ToString()).ToShortDateString();
     }
 }
コード例 #5
0
 /// <summary>
 /// 加载供应商档案信息
 /// </summary>
 private void LoadInfo(string supperId)
 {
     if (!string.IsNullOrEmpty(supperId))
     {
         //1.加载供应商档案主信息
         DataTable dt = DBHelper.GetTable("查看一条供应商档案信息", "tb_supplier", "*", " sup_id='" + supperId + "'", "", "");
         if (dt != null && dt.Rows.Count > 0)
         {
             CommonFuncCall.SetModlByDataTable(tb_supp_Model, dt);
             CommonFuncCall.SetShowControlValue(this, tb_supp_Model, "");
         }
     }
 }
コード例 #6
0
        /// <summary> 加载销售计划信息和配件信息
        /// </summary>
        /// <param name="planId"></param>
        private void LoadInfo(string planId)
        {
            if (!string.IsNullOrEmpty(planId))
            {
                //1.查看一条销售计划单信息
                DataTable dt = DBHelper.GetTable("查看一条销售计划单信息", "tb_parts_sale_plan", "*", " sale_plan_id='" + planId + "'", "", "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    CommonFuncCall.SetModlByDataTable(tb_purchase_Model, dt);
                    CommonFuncCall.SetShowControlValue(this, tb_purchase_Model, "");
                    chkis_suspend.Checked = tb_purchase_Model.is_suspend == "0";//选中(中止):0,未选中(不中止):1
                    lblcreate_time.Text   = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_purchase_Model.create_time.ToString())).ToString();
                    if (tb_purchase_Model.update_time > 0)
                    {
                        lblupdate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_purchase_Model.update_time.ToString())).ToString();
                    }

                    orderstatus = tb_purchase_Model.order_status;
                    if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.SUBMIT).ToString())
                    {
                        //已提交状态屏蔽提交、编辑、删除按钮
                        base.btnSubmit.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                        base.btnDelete.Enabled     = false;
                        base.btnActivation.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.AUDIT).ToString())
                    {
                        //已审核时屏蔽提交、审核、编辑、删除按钮
                        base.btnSubmit.Enabled     = false;
                        base.btnVerify.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                        base.btnDelete.Enabled     = false;
                        base.btnActivation.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.NOTAUDIT).ToString() || orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.DRAFT).ToString())
                    {
                        //审核没通过时屏蔽审核按钮
                        base.btnVerify.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.Invalid).ToString())
                    {
                        base.btnActivation.Caption = "激活";
                        base.btnSubmit.Enabled     = false;
                        base.btnVerify.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                    }
                }
            }
        }
コード例 #7
0
        /// <summary>
        /// 加载供应商档案信息
        /// </summary>
        private void LoadInfo(string supperId)
        {
            if (!string.IsNullOrEmpty(supperId))
            {
                //1.加载供应商档案主信息
                DataTable dt = DBHelper.GetTable("查看一条供应商档案信息", "tb_supplier", "*", " sup_id='" + supperId + "'", "", "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    tb_supplier model = new tb_supplier();
                    CommonFuncCall.SetModlByDataTable(model, dt);
                    CommonFuncCall.SetShowControlValue(this, model, "View");

                    DataTable dt_bill = CommonFuncCall.GetDataTable();
                    if (!string.IsNullOrEmpty(model.sup_type))
                    {
                        lblsup_type.Text = CommonFuncCall.GetBillNameByBillCode(dt_bill, model.sup_type);
                    }
                    if (!string.IsNullOrEmpty(model.unit_properties))
                    {
                        lblunit_properties.Text = CommonFuncCall.GetBillNameByBillCode(dt_bill, model.unit_properties);
                    }
                    if (!string.IsNullOrEmpty(model.price_type))
                    {
                        lblprice_type.Text = CommonFuncCall.GetBillNameByBillCode(dt_bill, model.price_type);
                    }
                    if (!string.IsNullOrEmpty(model.credit_class))
                    {
                        lblcredit_class.Text = CommonFuncCall.GetBillNameByBillCode(dt_bill, model.credit_class);
                    }
                    if (!string.IsNullOrEmpty(model.county))
                    {
                        lblsup_address.Text = CommonFuncCall.GetAddress(model.county) + " " + lblsup_address.Text;
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(model.city))
                        {
                            lblsup_address.Text = CommonFuncCall.GetAddress(model.city) + " " + lblsup_address.Text;
                        }
                        else
                        {
                            if (!string.IsNullOrEmpty(model.province))
                            {
                                lblsup_address.Text = CommonFuncCall.GetAddress(model.province) + " " + lblsup_address.Text;
                            }
                        }
                    }
                }
            }
        }
コード例 #8
0
        /// <summary>
        /// 加载仓库档案信息
        /// </summary>
        private void LoadInfo(string wareHouseId)
        {
            if (!string.IsNullOrEmpty(wareHouseId))
            {
                //1.加载仓库档案主信息
                DataTable dt = DBHelper.GetTable("查看一条仓库档案信息", "v_warehouse_companyname_username", "*", " wh_id='" + wareHouseId + "'", "", "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    CommonFuncCall.SetModlByDataTable(tb_warehouse_Model, dt);
                    CommonFuncCall.SetShowControlValue(this, tb_warehouse_Model, "");
                    txtChooseCompanty.Text = dt.Rows[0]["com_name"].ToString();
                    txtChooseCompanty.Tag  = dt.Rows[0]["com_id"].ToString();
                    txtChooseWhHead.Text   = dt.Rows[0]["wh_head"].ToString();
                }
                //2.加载仓库货位信息


                //3.加载附件信息
            }
        }
コード例 #9
0
        /// <summary>
        /// 加载供应商档案信息
        /// </summary>
        private void LoadInfo(string workingTimeId)
        {
            if (!string.IsNullOrEmpty(workingTimeId))
            {
                //1.加载工时档案主信息
                DataTable dt = DBHelper.GetTable("查看一条工时档案信息", "v_workhours_users", "*", " whours_id='" + workingTimeId + "'", "", "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    tb_workhours tb_workhours_Model = new tb_workhours();
                    CommonFuncCall.SetModlByDataTable(tb_workhours_Model, dt);
                    CommonFuncCall.SetShowControlValue(this, tb_workhours_Model, "");
                    if (tb_workhours_Model.whours_type == "1")
                    {
                        radIsWorkTime.Checked = true;
                    }
                    else if (tb_workhours_Model.whours_type == "2")
                    {
                        radIsQuota.Checked = true;
                    }
                    lblcreate_by.Text = dt.Rows[0]["create_username"].ToString();
                    lblupdate_by.Text = dt.Rows[0]["update_username"].ToString();

                    if (!string.IsNullOrEmpty(lblcreate_time.Text))
                    {
                        long ticks = (long)Convert.ToInt64(lblcreate_time.Text);
                        lblcreate_time.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }
                    if (!string.IsNullOrEmpty(lblupdate_time.Text))
                    {
                        long ticks = (long)Convert.ToInt64(lblupdate_time.Text);
                        lblupdate_time.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }

                    DataTable dt_bill = CommonFuncCall.GetDataTable();
                    if (!string.IsNullOrEmpty(tb_workhours_Model.repair_type))
                    {
                        lblrepair_type.Text = CommonFuncCall.GetBillNameByBillCode(dt_bill, tb_workhours_Model.repair_type);
                    }
                }
            }
        }
コード例 #10
0
 /// <summary>
 /// 加载供应商档案信息
 /// </summary>
 private void LoadInfo(string workingTimeId)
 {
     if (!string.IsNullOrEmpty(workingTimeId))
     {
         //1.加载工时档案主信息
         DataTable dt = DBHelper.GetTable("查看一条工时档案信息", "tb_workhours", "*", " whours_id='" + workingTimeId + "'", "", "");
         if (dt != null && dt.Rows.Count > 0)
         {
             CommonFuncCall.SetModlByDataTable(tb_workhours_Model, dt);
             CommonFuncCall.SetShowControlValue(this, tb_workhours_Model, "");
             if (tb_workhours_Model.whours_type == "1")
             {
                 radIsWorkTime.Checked = true;
             }
             else if (tb_workhours_Model.whours_type == "2")
             {
                 radIsQuota.Checked = true;
             }
         }
     }
 }
コード例 #11
0
        /// <summary>
        /// 加载采购计划信息和配件信息
        /// </summary>
        /// <param name="order_id"></param>
        private void LoadInfo(string order_id)
        {
            if (!string.IsNullOrEmpty(order_id))
            {
                //1.查看一条采购订单信息
                DataTable dt = DBHelper.GetTable("查看一条采购订单信息", "tb_parts_purchase_order", "*", " order_id='" + order_id + "'", "", "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    CommonFuncCall.SetModlByDataTable(tb_partspurchaseorder_Model, dt);
                    CommonFuncCall.SetShowControlValue(this, tb_partspurchaseorder_Model, "");
                    chkis_suspend.Checked = tb_partspurchaseorder_Model.is_suspend == "0";//选中(中止):0,未选中(不中止):1

                    if (!string.IsNullOrEmpty(lblorder_status.Text))
                    {
                        DataSources.EnumAuditStatus enumDataSources = (DataSources.EnumAuditStatus)Convert.ToInt16(lblorder_status.Text);
                        lblorder_status.Text = DataSources.GetDescription(enumDataSources, true);
                    }
                    if (!string.IsNullOrEmpty(lblorder_date.Text))
                    {
                        long ticks = Convert.ToInt64(lblorder_date.Text);
                        lblorder_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }
                    if (!string.IsNullOrEmpty(lblvalid_till.Text))
                    {
                        long ticks = Convert.ToInt64(lblvalid_till.Text);
                        lblvalid_till.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }
                    if (!string.IsNullOrEmpty(lblarrival_date.Text))
                    {
                        long ticks = Convert.ToInt64(lblarrival_date.Text);
                        lblarrival_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }
                    lblcreate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_partspurchaseorder_Model.create_time.ToString())).ToString();
                    if (tb_partspurchaseorder_Model.update_time > 0)
                    {
                        lblupdate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_partspurchaseorder_Model.update_time.ToString())).ToString();
                    }
                }
            }
        }
コード例 #12
0
 /// <summary> 加载采购计划信息和配件信息
 /// </summary>
 /// <param name="purchase_order_yt_id"></param>
 private void LoadInfo(string purchase_order_yt_id)
 {
     if (!string.IsNullOrEmpty(purchase_order_yt_id))
     {
         //1.查看一条宇通采购订单信息
         DataTable dt = DBHelper.GetTable("查看一条宇通采购订单信息", "tb_parts_purchase_order_2", "*", " purchase_order_yt_id='" + purchase_order_yt_id + "'", "", "");
         if (dt != null && dt.Rows.Count > 0)
         {
             CommonFuncCall.SetModlByDataTable(yt_purchaseorder_model, dt);
             CommonFuncCall.SetShowControlValue(this, yt_purchaseorder_model, "View");
             if (!string.IsNullOrEmpty(lblorder_date.Text))
             {
                 long ticks = Convert.ToInt64(lblorder_date.Text);
                 lblorder_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
             }
             lblcreate_time1.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(yt_purchaseorder_model.create_time.ToString())).ToString();
             if (yt_purchaseorder_model.update_time > 0)
             {
                 lblupdate_time1.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(yt_purchaseorder_model.update_time.ToString())).ToString();
             }
         }
     }
 }
コード例 #13
0
        /// <summary>
        /// 加载仓库档案信息
        /// </summary>
        private void LoadInfo(string wareHouseId)
        {
            if (!string.IsNullOrEmpty(wareHouseId))
            {
                //1.加载仓库档案主信息
                DataTable dt = DBHelper.GetTable("查看一条仓库档案信息", "v_warehouse_companyname_username", "*", " wh_id='" + wareHouseId + "'", "", "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    tb_warehouse tb_warehouse_Model = new tb_warehouse();
                    CommonFuncCall.SetModlByDataTable(tb_warehouse_Model, dt);
                    CommonFuncCall.SetShowControlValue(this, tb_warehouse_Model, "View");
                    lblcom_id.Text = dt.Rows[0]["com_name"].ToString();

                    DataSources.EnumDataSources enumDataSources = (DataSources.EnumDataSources)Convert.ToInt16(tb_warehouse_Model.data_source);
                    lbldata_source.Text = DataSources.GetDescription(enumDataSources, true);

                    if (!string.IsNullOrEmpty(tb_warehouse_Model.county))
                    {
                        lblwh_address.Text = CommonFuncCall.GetAddress(tb_warehouse_Model.county) + " " + lblwh_address.Text;
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(tb_warehouse_Model.city))
                        {
                            lblwh_address.Text = CommonFuncCall.GetAddress(tb_warehouse_Model.city) + " " + lblwh_address.Text;
                        }
                        else
                        {
                            if (!string.IsNullOrEmpty(tb_warehouse_Model.province))
                            {
                                lblwh_address.Text = CommonFuncCall.GetAddress(tb_warehouse_Model.province) + " " + lblwh_address.Text;
                            }
                        }
                    }
                }
            }
        }
コード例 #14
0
        /// <summary>
        /// 加载采购开单信息和配件信息
        /// </summary>
        /// <param name="purchase_billing_id"></param>
        private void LoadInfo(string purchase_billing_id)
        {
            if (!string.IsNullOrEmpty(purchase_billing_id))
            {
                //1.查看一条采购订单信息
                DataTable dt = DBHelper.GetTable("查看一条采购开单信息", "tb_parts_purchase_billing", "*", " purchase_billing_id='" + purchase_billing_id + "'", "", "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    CommonFuncCall.SetModlByDataTable(tb_partspurchasebill_Model, dt);
                    CommonFuncCall.SetShowControlValue(this, tb_partspurchasebill_Model, "View");

                    //采购收货
                    if (tb_partspurchasebill_Model.order_type == "1")
                    {
                        storage_count.HeaderText = "入库数量";
                    }
                    //采购退货
                    else if (tb_partspurchasebill_Model.order_type == "2")
                    {
                        storage_count.HeaderText = "出库数量";
                    }
                    //采购换货
                    else if (tb_partspurchasebill_Model.order_type == "3")
                    {
                        storage_count.HeaderText = "出/入库数量";
                    }

                    if (!string.IsNullOrEmpty(lblorder_date.Text))
                    {
                        long ticks = Convert.ToInt64(lblorder_date.Text);
                        lblorder_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }
                    if (!string.IsNullOrEmpty(lblpayment_date.Text))
                    {
                        long ticks = Convert.ToInt64(lblpayment_date.Text);
                        lblpayment_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }
                    lblcreate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_partspurchasebill_Model.create_time.ToString())).ToString();
                    if (tb_partspurchasebill_Model.update_time > 0)
                    {
                        lblupdate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_partspurchasebill_Model.update_time.ToString())).ToString();
                    }


                    orderstatus = tb_partspurchasebill_Model.order_status;
                    if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.SUBMIT).ToString())
                    {
                        //已提交状态屏蔽提交、编辑、删除按钮
                        base.btnSubmit.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                        base.btnDelete.Enabled     = false;
                        base.btnActivation.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.AUDIT).ToString())
                    {
                        //已审核时屏蔽提交、审核、编辑、删除按钮
                        base.btnSubmit.Enabled     = false;
                        base.btnVerify.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                        base.btnDelete.Enabled     = false;
                        base.btnActivation.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.NOTAUDIT).ToString() || orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.DRAFT).ToString())
                    {
                        //审核没通过时屏蔽审核按钮
                        base.btnVerify.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.Invalid).ToString())
                    {
                        base.btnActivation.Caption = "激活";
                        base.btnSubmit.Enabled     = false;
                        base.btnVerify.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                    }
                }
            }
        }
コード例 #15
0
        /// <summary>
        /// 加载销售计划信息和配件信息
        /// </summary>
        /// <param name="sale_billing_id"></param>
        private void LoadInfo(string sale_billing_id)
        {
            if (!string.IsNullOrEmpty(sale_billing_id))
            {
                //1.查看一条销售开单信息
                DataTable dt = DBHelper.GetTable("查看一条销售开单信息", "tb_parts_sale_billing", "*", " sale_billing_id='" + sale_billing_id + "'", "", "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    CommonFuncCall.SetModlByDataTable(tb_salebill_Model, dt);
                    CommonFuncCall.SetShowControlValue(this, tb_salebill_Model, "");
                    //销售开单
                    if (tb_salebill_Model.order_type == "1")
                    {
                        library_count.HeaderText         = "出库数量";
                        return_count.Visible             = true; //退货数量
                        assisted_auxiliary_count.Visible = true; //辅助数量
                        is_loss.Visible    = false;              //是否报损(0:不报损,1:报损)
                        loss_count.Visible = false;              //已报损数量
                    }
                    //销售退货
                    else if (tb_salebill_Model.order_type == "2")
                    {
                        library_count.HeaderText         = "入库数量";
                        return_count.Visible             = false; //退货数量
                        assisted_auxiliary_count.Visible = false; //辅助数量
                        is_loss.Visible    = true;                //是否报损(0:不报损,1:报损)
                        loss_count.Visible = true;                //已报损数量
                    }
                    //销售换货
                    else if (tb_salebill_Model.order_type == "3")
                    {
                        library_count.HeaderText         = "出/入库数量";
                        return_count.Visible             = false; //退货数量
                        assisted_auxiliary_count.Visible = false; //辅助数量
                        is_loss.Visible    = false;               //是否报损(0:不报损,1:报损)
                        loss_count.Visible = false;               //已报损数量
                    }

                    if (!string.IsNullOrEmpty(lblorder_date.Text))
                    {
                        long ticks = Convert.ToInt64(lblorder_date.Text);
                        lblorder_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }
                    if (!string.IsNullOrEmpty(lblreceivables_date.Text))
                    {
                        long ticks = Convert.ToInt64(lblreceivables_date.Text);
                        lblreceivables_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }
                    lblcreate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_salebill_Model.create_time.ToString())).ToString();
                    if (tb_salebill_Model.update_time > 0)
                    {
                        lblupdate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_salebill_Model.update_time.ToString())).ToString();
                    }
                    orderstatus = tb_salebill_Model.order_status;
                    if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.SUBMIT).ToString())
                    {
                        //已提交状态屏蔽提交、编辑、删除按钮
                        base.btnSubmit.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                        base.btnDelete.Enabled     = false;
                        base.btnActivation.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.AUDIT).ToString())
                    {
                        //已审核时屏蔽提交、审核、编辑、删除按钮
                        base.btnSubmit.Enabled     = false;
                        base.btnVerify.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                        base.btnDelete.Enabled     = false;
                        base.btnActivation.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.NOTAUDIT).ToString() || orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.DRAFT).ToString())
                    {
                        //审核没通过时屏蔽审核按钮
                        base.btnVerify.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.Invalid).ToString())
                    {
                        base.btnActivation.Caption = "激活";
                        base.btnSubmit.Enabled     = false;
                        base.btnVerify.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                    }
                }
            }
        }
コード例 #16
0
 public void LoadControlInfo(tb_parts_purchase_order_2 model)
 {
     CommonFuncCall.SetShowControlValue(this, model, "");
 }
コード例 #17
0
        /// <summary>
        /// 加载采购计划信息和配件信息
        /// </summary>
        /// <param name="order_id"></param>
        private void LoadInfo(string order_id)
        {
            if (!string.IsNullOrEmpty(order_id))
            {
                //1.查看一条采购订单信息
                DataTable dt = DBHelper.GetTable("查看一条采购订单信息", "tb_parts_purchase_order", "*", " order_id='" + order_id + "'", "", "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    CommonFuncCall.SetModlByDataTable(tb_partspurchaseorder_Model, dt);
                    CommonFuncCall.SetShowControlValue(this, tb_partspurchaseorder_Model, "");
                    chkis_suspend.Checked = tb_partspurchaseorder_Model.is_suspend == "0";//选中(中止):0,未选中(不中止):1

                    if (!string.IsNullOrEmpty(lblorder_status.Text))
                    {
                        DataSources.EnumAuditStatus enumDataSources = (DataSources.EnumAuditStatus)Convert.ToInt16(lblorder_status.Text);
                        lblorder_status.Text = DataSources.GetDescription(enumDataSources, true);
                    }
                    if (!string.IsNullOrEmpty(lblorder_date.Text))
                    {
                        long ticks = Convert.ToInt64(lblorder_date.Text);
                        lblorder_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }
                    if (!string.IsNullOrEmpty(lblvalid_till.Text))
                    {
                        long ticks = Convert.ToInt64(lblvalid_till.Text);
                        lblvalid_till.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }
                    if (!string.IsNullOrEmpty(lblarrival_date.Text))
                    {
                        long ticks = Convert.ToInt64(lblarrival_date.Text);
                        lblarrival_date.Text = Common.UtcLongToLocalDateTime(ticks).ToString();
                    }
                    lblcreate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_partspurchaseorder_Model.create_time.ToString())).ToString();
                    if (tb_partspurchaseorder_Model.update_time > 0)
                    {
                        lblupdate_time.Text = Common.UtcLongToLocalDateTime(Convert.ToInt64(tb_partspurchaseorder_Model.update_time.ToString())).ToString();
                    }

                    orderstatus = tb_partspurchaseorder_Model.order_status.ToString();
                    if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.SUBMIT).ToString())
                    {
                        //已提交状态屏蔽提交、编辑、删除按钮
                        base.btnSubmit.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                        base.btnDelete.Enabled     = false;
                        base.btnActivation.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.AUDIT).ToString())
                    {
                        //已审核时屏蔽提交、审核、编辑、删除按钮
                        base.btnSubmit.Enabled     = false;
                        base.btnVerify.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                        base.btnDelete.Enabled     = false;
                        base.btnActivation.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.NOTAUDIT).ToString() || orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.DRAFT).ToString())
                    {
                        //审核没通过时屏蔽审核按钮
                        base.btnVerify.Enabled = false;
                    }
                    else if (orderstatus == Convert.ToInt32(DataSources.EnumAuditStatus.Invalid).ToString())
                    {
                        base.btnActivation.Caption = "激活";
                        base.btnSubmit.Enabled     = false;
                        base.btnVerify.Enabled     = false;
                        base.btnEdit.Enabled       = false;
                    }
                }
            }
        }