| | |
| | | using System.Drawing; |
| | | using System.IO; |
| | | using System.Net; |
| | | using System.Net.Cache; |
| | | using System.Net.Http; |
| | | using System.Reflection; |
| | | using System.Resources; |
| | |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.Office.Model; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors.Controls; |
| | | using DevExpress.XtraGrid; |
| | |
| | | request.Accept = "*/*"; |
| | | request.Timeout = 15000; |
| | | request.AllowAutoRedirect = false; |
| | | request.ServicePoint.Expect100Continue = false; |
| | | HttpRequestCachePolicy noCachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore); |
| | | request.CachePolicy = noCachePolicy; |
| | | using (Stream requestStream = await request.GetRequestStreamAsync()) |
| | | { |
| | | byte[] dataBytes = Encoding.UTF8.GetBytes(param); |
| | |
| | | request.Accept = "*/*"; |
| | | request.Timeout = 15000; |
| | | request.AllowAutoRedirect = false; |
| | | request.ServicePoint.Expect100Continue = false; |
| | | HttpRequestCachePolicy noCachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore); |
| | | request.CachePolicy = noCachePolicy; |
| | | StreamWriter requestStream = null; |
| | | WebResponse response = null; |
| | | string responseStr = null; |
| | |
| | | { |
| | | var txt = colType as UcLookCk; |
| | | txt.SetIdOrCode(strVal); |
| | | txt.Enabled = !isEdt; |
| | | if (txt.IsReadly == false) |
| | | txt.Enabled = !isEdt; |
| | | else |
| | | txt.Enabled = false; |
| | | continue; |
| | | } |
| | | //自定义供应商 |
| | |
| | | { |
| | | var txt = colType as UcLookSupplier; |
| | | txt.SetIdOrCode(strVal); |
| | | txt.Enabled = !isEdt; |
| | | if (txt.IsReadly == false) |
| | | txt.Enabled = !isEdt; |
| | | else |
| | | txt.Enabled = false; |
| | | continue; |
| | | } |
| | | //自定义物料 |
| | |
| | | { |
| | | var txt = colType as UcLookItems; |
| | | txt.SetIdOrCode(strVal); |
| | | txt.Enabled = !isEdt; |
| | | if (txt.IsReadly == false) |
| | | txt.Enabled = !isEdt; |
| | | else |
| | | txt.Enabled = false; |
| | | continue; |
| | | } |
| | | if (colType is SimpleButton) |
| | |
| | | , Label lbGuid |
| | | , TextEdit txtName |
| | | , GridView gridView1 |
| | | , string fileName = "" |
| | | , int SelectedTabPageIndex = 1) |
| | | { |
| | | var _strGuid = ""; |
| | |
| | | else |
| | | { |
| | | _strGuid = dr["guid"].ToString(); |
| | | _strName = dr[1].ToString(); |
| | | if (string.IsNullOrEmpty(fileName)) |
| | | _strName = dr[1].ToString(); |
| | | else |
| | | _strName = dr[fileName].ToString(); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | return ""; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="s"></param> |
| | | /// <param name="btnChkIco"></param> |
| | | /// <param name="fm"></param> |
| | | /// <param name="fileName">对应的审核字段名称</param> |
| | | /// <param name="icoName"></param> |
| | | public static void SetCheckIco(object s, PictureBox btnChkIco, Form fm, string fileName = "checkStatus", string icoName = "") |
| | | { |
| | | GridView dgv = s as GridView; |
| | | if (dgv != null) |
| | | { |
| | | if (dgv.GetSelectedRows() != null) |
| | | { |
| | | var selectedRow = dgv.GetSelectedRows()[0]; // 获取第一个选中行的索引 |
| | | if (selectedRow >= 0) |
| | | { |
| | | var checkStatus = dgv.GetRowCellValue(selectedRow, fileName).ToString(); // 获取指定列的值 |
| | | btnChkIco.Text = checkStatus; |
| | | btnChkIco.Visible = true; |
| | | if (checkStatus == "1" || checkStatus.ToUpper() == true.ToString().ToUpper()) |
| | | btnChkIco.Image = global::Gs.DevApp.Properties.Resources.ico_check; |
| | | else |
| | | btnChkIco.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck; |
| | | btnChkIco.Anchor = AnchorStyles.Top | AnchorStyles.Right; // 靠右 |
| | | btnChkIco.Location = new Point(fm.ClientSize.Width - btnChkIco.Width - 20, 80); // 距离顶部10像素 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |