雪花

四、字段大全

一、

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using YKERP.BaseForms;
using YKERP.Business;
using YKERP.Tools;
 
namespace YKERP.StoreADJ
{
    public partial class StoreFiRE : YKBaseForm
    {
        public StoreFiRE()
        {
            InitializeComponent();
            BindCtrlData();
            Select_just_dates.Value = DateTime.Now.AddDays(-7);
            Date_account_dates.Value = DateTime.Now.AddDays(-7);
 
 
            //Edit_if_costadjust.ItemIndex =1;
 
 
        }
 
        public  void BindCtrlData()
        {
 
            gridview_product.BindComboEditor("status_num_id", CommonDicType.调拨单状态);
            gridview_product.BindComboEditor("sub_unit_num_id", CommonDicType.门店);
            gridview_product.BindComboEditor("div_num_id", CommonDicType.部类);
 
            gridview_product.BindComboEditor("create_user_id", CommonDicType.人员);
            gridview_product.BindComboEditor("last_update_user_id", CommonDicType.人员);
 
            var apple_type = new List<object>() {
               new { id = "0", name = "全部" },
               new { id = "1", name = "新增合同" },
               new { id = "2", name = "续签合同" },
               new { id = "3", name = "截至合同" },
               new { id = "4", name = "打回合同" }
           };
            Edit_so_from_type.BindDataTable(YKTool.listToDataTable(apple_type));
            gridview_product.BindComboEditor("so_from_type", YKTool.listToDataTable(apple_type));
 
 
            var type_num = new List<object>() {
               new { id = "1", name = "指定批次调价" },
               new { id = "2", name = "只调低价格" },
               new { id = "3", name = "指定价格调整" },
           };
            Select_type_num_id.BindDataTable(YKTool.listToDataTable(type_num));
            gridview_product.BindComboEditor("type_num_id", YKTool.listToDataTable(type_num));
 
 
            var costadjust = new List<object>() {
               new { id = "0", name = "否" },
               new { id = "1", name = "是" },
           };
            Edit_if_costadjust.BindDataTable(YKTool.listToDataTable(costadjust));
 
 
        }
 
        /// <summary>
        /// 查询数据
        /// </summary>
        private void SearchData()
        {
            GridPage.ClearQueryField();
           
            GridPage.IN_SQLID = "YKERP-WM-0331";
            GridPage.IN_GRID_CONTROL = gridview_FiRE;
 
            //调整单号 文本框的
            if (!string.IsNullOrWhiteSpace(Txt_reserved_no.Text))
            {
                GridPage.AddQueryField("reserved_no", Txt_reserved_no.Text);
            }
             //门店
            var status_num_id = Select_sub_unit_num_id.GetSelectedSubUnit();
            if (status_num_id !=null)
            {
                GridPage.AddQueryField("sub_unit_num_id", status_num_id.sub_unit_num_id);
            }
 
          
            var div_num_id = Select_div_num_id.GetSelectedProdDiv();
            //商品部类
            if (div_num_id != null) //文本框的
            {
                GridPage.AddQueryField("div_num_id", div_num_id.div_num_id.ToString());
            }
 
             
              
           //调整时间  开始时间
           if (!string.IsNullOrWhiteSpace(Select_just_dates.Text)) //文本框的
           {
               GridPage.AddQueryField("just_dates", Select_just_dates.Text);
           }
 
           //调整时间  结束时间
           if (!string.IsNullOrWhiteSpace(Select_just_dated.Text)) //文本框的
           {
               GridPage.AddQueryField("just_dated", Select_just_dated.Text);
           }
 
 
            var so_from_typ = Edit_so_from_type.EditValue?.ToString()?.ToInt() ?? 0;
            //来源
            if (!string.IsNullOrWhiteSpace(Edit_so_from_type.Text)) //文本框的
            {
                GridPage.AddQueryField("so_from_type", so_from_typ.ToString());
            }
 
            //业务类型
 
 
 
            var num_id = Select_type_num_id.EditValue?.ToString()?.ToInt() ?? 0;
            if (num_id > 0) //文本框的
            {
                GridPage.AddQueryField("type_num_id", num_id.ToString());
            }
 
            //记账时间  开始时间
            if (!string.IsNullOrWhiteSpace(Date_account_dates.Text)) //文本框的
            {
                GridPage.AddQueryField("account_dates", Date_account_dates.Text);
            }
            //记账时间  结束时间
            if (!string.IsNullOrWhiteSpace(Date_account_dated.Text)) //文本框的
            {
                GridPage.AddQueryField("account_dated", Date_account_dated.Text);
            }
 
           
              
           //条码
           if (!string.IsNullOrWhiteSpace(Txt_barcode.Text)) //文本框的
           {
               GridPage.AddQueryField("barcode", Txt_barcode.Text);
           }
 
            var Txt_item_num = Txt_item_num_id.GetSelectedProduct();
           //商品名字
           if (Txt_item_num!=null) //文本框的
           {
               GridPage.AddQueryField("item_num_id", Txt_item_num.item_num_id);
           }
 
            var status_num = Select_status_num_id.GetSelectedDirectTransStatus();
            //状态       二、 这个对应不上
            if (status_num!=null) //  没有用到
           {
               GridPage.AddQueryField("status_num_id", status_num.type_num_id);
           }
 
            var create_user_id = Select_create_user_id.GetSelectedUser();
            //创建人
            if (create_user_id!=null) //文本框的
           {
                GridPage.AddQueryField("create_user_id", create_user_id.empe_num_id);
           }
 
 
            var if_costadjust = Edit_if_costadjust.EditValue?.ToString()?.ToInt() ?? 0;
            //是否产生供应商金额调整单
            if (if_costadjust>0) //文本框的
           {
               GridPage.AddQueryField("if_costadjust", if_costadjust.ToString());
           }
 
            GridPage.InitPages();
        }
 
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            this.ShowLoading("正在查询,请稍候...");
            SearchData();
            this.HideLoading();
        }
 
        private void spBtnReset_Click(object sender, EventArgs e)
        {
            this.ClearInputData();
        }
 
        /// <summary>
        /// 清空控件输入值
        /// </summary>
        private void ClearInputData()
        {
            Txt_reserved_no.Text = "";
            Select_sub_unit_num_id.Clear();//门店
            Select_div_num_id.Clear();
            Select_just_dates.SetText(""); //日期
            Select_just_dated.SetText("");
            Edit_so_from_type.EditValue = "";//下拉框
            Select_type_num_id.EditValue = "";
      
            Date_account_dates.SetText("");
            Date_account_dated.SetText("");
            Txt_barcode.Text = "";
            Txt_item_num_id.Clear();
            Select_status_num_id.Clear();
            Select_create_user_id.Clear();
            Edit_if_costadjust.EditValue = "";
        }
 
 
    }
}

  

posted @   十色  阅读(271)  评论(0编辑  收藏  举报
编辑推荐:
· DeepSeek 解答了困扰我五年的技术问题
· 为什么说在企业级应用开发中,后端往往是效率杀手?
· 用 C# 插值字符串处理器写一个 sscanf
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
阅读排行:
· DeepSeek 解答了困扰我五年的技术问题。时代确实变了!
· PPT革命!DeepSeek+Kimi=N小时工作5分钟完成?
· What?废柴, 还在本地部署DeepSeek吗?Are you kidding?
· DeepSeek企业级部署实战指南:从服务器选型到Dify私有化落地
· 程序员转型AI:行业分析
  1. 1 少年 梦然
  2. 2 尘埃 林小柯
  3. 3 飞鸟和禅 任然
  4. 4 Dancing With Your Ghost Sasha Sloan
  5. 5 烟火人间 添儿呗
  6. 6 摘仙 伊格赛听、叶里
少年 - 梦然
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.
点击右上角即可分享
微信分享提示