//dataConn dc = new dataConn(); public ctrlProcessFile(string sn) { InitializeComponent(); //listView2.View = View.SmallIcon; listView1.View = View.SmallIcon; this.RMesDataChanged += new RMesEventHandler(ctrlProcessFile_RMesDataChanged); //listView2.DoubleClick+=new EventHandler(listView1_DoubleClick); CompanyCode = LoginInfo.CompanyInfo.COMPANY_CODE; PlineID = LoginInfo.ProductLineInfo.RMES_ID; PlineCode1 = LoginInfo.ProductLineInfo.PLINE_CODE; StationID = LoginInfo.StationInfo.RMES_ID; Station_Code = LoginInfo.StationInfo.STATION_CODE; StationName = LoginInfo.StationInfo.STATION_NAME; ShiftCode = LoginInfo.ShiftInfo.SHIFT_CODE; TeamCode = LoginInfo.TeamInfo.TEAM_CODE; UserID = LoginInfo.UserInfo.USER_ID; len_sn = LoginInfo.LEN_SN; TheSo = ""; TheSn = ""; ThePlancode = ""; product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn);//获取sn信息 if (product != null) { TheSo = product.PLAN_SO; TheSn = product.SN; ThePlancode = product.PLAN_CODE; initInfo(""); } }
public bool InsertInfo(ProductInfoEntity obj) { con = Connectionsql.Connection(); bool term = SelectMysql.result("insert into tb_commodityInfo(commodityId,commodityName,businessName,costPrice,unitPrice,commodityNumber" + ",remarks) values(" + "'" + obj.ProductId + "'" + "," + "'" + obj.Productname + "'" + "," + "'" + obj.Merchantname + "'" + "," + "'" + obj.Costprice + "'" + "," + "'" + obj.Unitprice + "'" + "," + "'" + obj.Merchantinventory + "'" + "," + "'" + obj.Remarks + "')"); try { if (term == true) { return(term); } } catch (MySqlException e) { MessageBox.Show(e.Message, "提示", MessageBoxButtons.OK); } finally { con.Close(); } return(term); }
private void button1_Click(object sender, EventArgs e) { string commodityId = textBox1_ID.Text; string commodityName = comboBox2.Text; string businessName = comboBox1.Text; string str = textBox5_CBJ.Text; int costPrice = int.Parse(str); string str1 = textBox3_DJ.Text; int unitPrice = int.Parse(str1); string str2 = textBox4_SPKCL.Text; int commodityNumber = int.Parse(str2); string remarks = textBox7_BZ.Text; ProductInfoEntity entity = new ProductInfoEntity(commodityId, commodityName, businessName, costPrice, unitPrice, commodityNumber, remarks); IStockManageController stockManageController = new StockManageControllerImpl(); bool term = stockManageController.InsertProductInfo(entity); if (term == true) { StockManage form = new StockManage(); MessageBox.Show("添加库存信息成功"); this.DialogResult = DialogResult.OK; this.Hide(); } else { MessageBox.Show("添加库存信息失败!"); } }
protected void ctrlStationOffline_RmesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { if (e.MessageHead == "OFFLINE") { //string[] txt = e.MessageBody.ToString().Split('^'); //string sn = txt[0]; //string quality_status = txt[1]; string sn = e.MessageBody.ToString(); ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn); //获取sn信息 //PlanSnEntity plansn1 = PlanSnFactory.GetBySn(sn); string plan_code = product.PLAN_CODE; //modify by thl 20161212 下线点对应的操作改到发动机第一次入库处执行 if (dataConn.GetValue("select count(1) from data_complete where sn='" + sn + "' and plan_code='" + plan_code + "' and station_code='" + LoginInfo.StationInfo.STATION_CODE + "' ") == "1") { dataConn.ExeSql("UPDATE DATA_PLAN SET OFFLINE_QTY=OFFLINE_QTY+1 WHERE plan_code='" + plan_code + "' "); } if (LoginInfo.ProductLineInfo.PLINE_CODE == "CL") { ProductDataFactory.Station_OffLine(product.PLAN_CODE, sn, "Y"); } } //else if (e.MessageHead == "SN") //{ // RMESEventArgs args = new RMESEventArgs(); // args.MessageHead = "OFFCTRL"; // args.MessageBody = ""; // SendDataChangeMessage(args); //} }
protected void ctrlProductScan_RmesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { string sn, quality_status = "A"; RMESEventArgs arg = new RMESEventArgs(); arg.MessageHead = ""; arg.MessageBody = ""; if (e.MessageHead == null) { return; } if (e.MessageHead == "SN") { //上线后打印条码 sn = e.MessageBody.ToString(); product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn);//获取sn信息 ThisSmTm = product.PLAN_SO + "^DCEC^" + sn; PublicClass.PrintTmISDE(product.PLAN_CODE, ThisSmTm); arg.MessageHead = "CLEAR1"; arg.MessageBody = ""; SendDataChangeMessage(arg); timer1.Enabled = true; } if (e.MessageHead == "REFRESHCLPLAN") { timer1.Enabled = true; } }
protected void ctrlOptionComplete_RmesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { if (e.MessageHead == "VIN") { gridOptionList.Enabled = true; ProductInfoEntity product = (ProductInfoEntity)e.MessageBody; sn = product.SN; switch (type) { case "0": //站点 initials(); break; case "1": //工序 initial(); break; default: break; } OptionShow_Load(); if (state == 0) //报完工发送消息 { RMESEventArgs args = new RMESEventArgs(); args.MessageHead = "OPTIONCOMPLETES"; args.MessageBody = null; UiFactory.CallDataChanged(this, args); } } }
protected void ctrlInitOnline_RmesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { if (e.MessageHead == null) { return; } if (e.MessageHead == "ONLINEONLINE") { //上线完成 自动刷下一个 打印条码 string sn = e.MessageBody.ToString(); product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn);//获取sn信息 if (product == null) { return; } //if (check1.Checked) if (LoginInfo.ProductLineInfo.PLINE_CODE == "Z") { PublicClass.PrintTmFz(sn, product.PLAN_SO, product.CUSTOMER_NAME, "", product.PRODUCT_MODEL, 2, product.PLAN_CODE); } else { PublicClass.PrintTmFz(sn, product.PLAN_SO, product.CUSTOMER_NAME, "", product.PRODUCT_MODEL, 2, product.PLAN_CODE); } //timer1.Enabled = true; //timer1.Start(); //timer1_Tick(timer1, new EventArgs()); } }
private void InitQuality(string sn1) { SN = sn1; if (SN != "") { ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(LoginInfo.CompanyInfo.COMPANY_CODE, SN); if (product == null) { return; } PlanCode = product.PLAN_CODE; PlanSo = product.PLAN_SO; Fdjxl = product.PRODUCT_SERIES; Gylx = product.ROUNTING_REMARK; stationcode_fx = StationCode; stationname_fx = StationName; //check中 显示BOM信息和检测数据 SNDetectTempFactory.InitQualitDetectList(CompanyCode, PlineID, StationID, PlanCode, SN, UserCode, StationID); string sql = "select * from data_sn_detect_data_TEMP where station_code='" + StationCode + "' and sn='" + SN + "' and plan_code='" + PlanCode + "' and detect_name!='LJTM' order by location_code,detect_seq "; DataTable dt = dataConn.GetTable(sql); if (dt.Rows.Count > 0) { DataRow dr = dt.NewRow(); dt.Rows.Add(dr); } this.GridQuality.DataSource = dt; ShowQualityList(); if (GridQuality.Rows.Count > 0) { GetFocus(0); } } }
public bool UpdateInfo(ProductInfoEntity obj, string jobnumber) { con = Connectionsql.Connection(); bool term = SelectMysql.result("update tb_commodityInfo set commodityId='" + obj.ProductId + "'," + "commodityName='" + obj.Productname + "',businessName='" + obj.Merchantname + "',costPrice='" + obj.Costprice + "',unitPrice=" + "'" + obj.Unitprice + "',commodityNumber='" + obj.Merchantinventory + "'" + ",remarks='" + obj.Remarks + "' where purchaseId='" + jobnumber + "'"); try { if (term == true) { return(term); } } catch (MySqlException e) { MessageBox.Show(e.Message, "提示", MessageBoxButtons.OK); } finally { con.Close(); } return(term); }
protected void ctrlProductScan_RmesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { string sn, quality_status = "A"; if (e.MessageHead == null) { return; } if (e.MessageHead == "SN") { //上线后打印条码 sn = e.MessageBody.ToString(); product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn);//获取sn信息 ThePlancode = product.PLAN_CODE; TheSo = product.PLAN_SO; PublicClass.PrintTmISDE(product.PLAN_CODE, ThisSmTm); txtGTH.Text = ""; arg.MessageHead = "CLEAR1"; arg.MessageBody = ""; SendDataChangeMessage(arg); timer1.Enabled = true; } if (e.MessageHead == "ONLINEONLINE") { DataTable dt = dataConn.GetTable("select plan_code from data_plan where plan_qty<=online_qty and plan_code='" + ThePlancode + "'"); if (dt.Rows.Count > 0) { ProductDataFactory.ISDE_CREATE_JK_SJJHB(PlineCode1); } timer1.Enabled = true; } }
void ctrl_Fx_RMesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { try { RMESEventArgs arg = new RMESEventArgs(); arg.MessageHead = ""; arg.MessageBody = ""; if (e.MessageHead == null) { return; } if (e.MessageHead == "SN") { TheSn = e.MessageBody.ToString(); product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, TheSn);//获取sn信息 if (product == null) { return; } TheSo = product.PLAN_SO; ThePlancode = product.PLAN_CODE; } } catch (Exception e1) { MessageBox.Show(e1.Message); } }
public ProductInfoReadDto AddProduct([FromBody] ProductInfoDto productInfoDto) { var x = new ProductInfoEntity { ApiVersion = ProductInfoEntity.CrdGroup + "/" + ProductInfoEntity.CrdApiVersion, Kind = ProductInfoEntity.CrdKind, Metadata = { Name = productInfoDto.Id }, Spec = { MaximumQuantity = productInfoDto.MaximumQuantity, MinimumQuantity = productInfoDto.MinimumQuantity, Description = productInfoDto.Description } }; var body = JObject.FromObject(x, _camelCaseSerializer); //kubectl.exe get todospecs.experiments.sabba //kubectl.exe get todospecs.experiments.sabba--all - namespaces var list = _kubernetesClient.CreateNamespacedCustomObject(body, ProductInfoEntity.CrdGroup, ProductInfoEntity.CrdApiVersion , Namespace, ProductInfoEntity.CrdPluralName) as JObject; return(new ProductInfoReadDto { Description = productInfoDto.Description, MinimumQuantity = productInfoDto.MinimumQuantity, MaximumQuantity = productInfoDto.MaximumQuantity, Id = productInfoDto.Id }); }
void ctrPlan_RMesDataChanged(object obj, RMESEventArgs e) { if (e.MessageHead == null) { return; } //if (e.MessageHead == "MESLL" || e.MessageHead=="QUA") //{ // this.Visible = false; // return; //} //if (e.MessageHead.ToString() == "WORK") //{ // this.Visible = true; // return; //} //if (e.MessageHead.ToString() == "PLAN") //{ // InitPlan(e.MessageBody.ToString()); // return; //} if (e.MessageHead == "SN") { string sn = e.MessageBody.ToString(); ProductInfoEntity ent = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn); if (ent != null) { planCode = ent.PLAN_CODE; initPlan(); InitPlan(planCode); return; } } if (e.MessageHead == "REFRESHPLAN") { string sn = e.MessageBody.ToString(); ProductInfoEntity ent = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn); if (ent != null) { planCode = ent.PLAN_CODE; initPlan(); InitPlan(planCode); return; } } //if (e.MessageHead == "SCP") //{ // getPlan(PlineCode); // CurPlancode = "none"; // return; //} //if (e.MessageHead == "EXIT") //{ // //HandleExit(CurPlancode); // return; //} }
public UpdateStock(ProductInfoEntity productInfoEntity) { InitializeComponent(); textBox1_ID.Text = productInfoEntity.ProductId; comboBox2.Text = productInfoEntity.Productname; comboBox1.Text = productInfoEntity.Merchantname; textBox3_DJ.Text = productInfoEntity.Costprice.ToString(); textBox5_CBJ.Text = productInfoEntity.Unitprice.ToString(); textBox4_SPKCL.Text = productInfoEntity.Merchantinventory.ToString(); textBox7_BZ.Text = productInfoEntity.Remarks; selectColumn("businessName", "tb_supplier"); selectColumn("commodityName", "tb_purchase"); }
//添加 private void button1_Click(object sender, EventArgs e) { ProductInfoEntity entity = StockUpdate(); IStockManageController manageController = new StockManageControllerImpl(); bool term = manageController.UpdateProductInfo(entity, entity.ProductId); if (term == true) { MessageBox.Show("修改库存信息成功!"); this.DialogResult = DialogResult.OK; this.Hide(); } }
public bool Delete(Guid Id) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { ProductInfoEntity _ProductInfoEntity = new ProductInfoEntity(Id); if (adapter.FetchEntity(_ProductInfoEntity)) { adapter.DeleteEntity(_ProductInfoEntity); toReturn = true; } } return toReturn; }
internal ProductInfoEntity StockUpdate() { string commodityId = textBox1_ID.Text; string commodityName = comboBox2.Text; string businessName = comboBox1.Text; string str = textBox5_CBJ.Text; int costPrice = int.Parse(str); string str1 = textBox3_DJ.Text; int unitPrice = int.Parse(str1); string str2 = textBox4_SPKCL.Text; int commodityNumber = int.Parse(str2); string remarks = textBox7_BZ.Text; ProductInfoEntity entity = new ProductInfoEntity(commodityId, commodityName, businessName, costPrice, unitPrice, commodityNumber, remarks); return(entity); }
private void toolStripButton2_Click(object sender, EventArgs e) { DialogResult dialog = MessageBox.Show(this, "确定要修改此库存信息吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (this.dataGridView1.SelectedRows.Count == 0) { MessageBox.Show("没有选中库存信息!"); return; } ProductInfoEntity productInfoEntity = new ProductInfoEntity(); if (dialog == DialogResult.Yes) { int i = this.dataGridView1.CurrentRow.Index; productInfoEntity.ProductId = dataGridView1.CurrentRow.Cells[0].Value.ToString(); productInfoEntity.Productname = dataGridView1.Rows[i].Cells[1].Value.ToString(); productInfoEntity.Merchantname = dataGridView1.Rows[i].Cells[2].Value.ToString(); productInfoEntity.Costprice = int.Parse(dataGridView1.Rows[i].Cells[3].Value.ToString()); productInfoEntity.Unitprice = int.Parse(dataGridView1.Rows[i].Cells[4].Value.ToString()); productInfoEntity.Merchantinventory = int.Parse(dataGridView1.Rows[i].Cells[5].Value.ToString()); productInfoEntity.Remarks = dataGridView1.Rows[i].Cells[6].Value.ToString(); UpdateStock update = new UpdateStock(productInfoEntity); DialogResult dt = update.ShowDialog(); if (dt == DialogResult.OK) { productInfoEntity = update.StockUpdate(); dataGridView1.CurrentRow.Cells[0].Value = productInfoEntity.ProductId; dataGridView1.Rows[i].Cells[1].Value = productInfoEntity.Productname; dataGridView1.Rows[i].Cells[2].Value = productInfoEntity.Merchantname; dataGridView1.Rows[i].Cells[3].Value = productInfoEntity.Costprice; dataGridView1.Rows[i].Cells[4].Value = productInfoEntity.Unitprice; dataGridView1.Rows[i].Cells[5].Value = productInfoEntity.Merchantinventory; dataGridView1.Rows[i].Cells[6].Value = productInfoEntity.Remarks; } } if (productInfoEntity == null) { MessageBox.Show("未选中库存信息!"); return; } }
public ctrl_quality(string type, string sn, string stationcode1) { InitializeComponent(); CompanyCode = LoginInfo.CompanyInfo.COMPANY_CODE; PlineID = LoginInfo.ProductLineInfo.RMES_ID; PlineCode = LoginInfo.ProductLineInfo.PLINE_CODE; StationCode = LoginInfo.StationInfo.STATION_CODE; stationname = LoginInfo.StationInfo.STATION_NAME; GridQuality.AutoGenerateColumns = false; GridQuality.RowHeadersVisible = false; GridQuality.DataSource = null; Thetype = type; TheSn = sn; product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, TheSn);//获取sn信息 if (product == null) { return; } //执行存储过程 获取RSTBOMQATS ProductDataFactory.PL_QUERY_QAZJTS(product.PLAN_SO, StationCode, PlineCode, "", product.PLAN_CODE, sn); string sql = "select count(1) from data_sn_qa where company_code='" + CompanyCode + "' and plan_code='" + product.PLAN_CODE + "' and sn='" + TheSn + "' and station_code='" + StationCode + "' and pline_code='" + PlineCode + "' "; if (dataConn.GetValue(sql) == "0") { //插入data_sn_qa sql = " insert into data_sn_qa(rmes_id,sn,company_code,plan_code,pline_code,location_code,station_code,question,standard_answer,station_name) " + " select seq_rmes_id.nextval,'" + TheSn + "','" + CompanyCode + "','" + product.PLAN_CODE + "','" + PlineCode + "',gwdm,'" + StationCode + "',question,answer,'" + stationname + "' from RSTBOMQATS where zddm='" + StationCode + "' "; dataConn.ExeSql(sql); } ThePlancode = product.PLAN_CODE; GridQuality.Focus(); IsABC = false; ShowData(type, TheSn, stationcode1);//A显示前道站点质量信息 B 显示当前站点质量信息 try { if (GridQuality.Rows.Count > 0 && IsABC) { PlanSnFactory.InitStationControl(CompanyCode, PlineID, LoginInfo.StationInfo.RMES_ID, product.PLAN_CODE, product.SN, "Rmes.WinForm.Controls.ctrl_quality"); dataConn.ExeSql("update data_sn_controls_complete set complete_flag='A' where station_code='" + LoginInfo.StationInfo.RMES_ID + "' and control_name='Rmes.WinForm.Controls.ctrl_quality' and sn='" + product.SN + "' and plan_code='" + product.PLAN_CODE + "' "); } } catch { } //this.RMesDataChanged += new RMesEventHandler(ctrl_Tj_RMesDataChanged); }
void ctrlProcessFile_RMesDataChanged(object obj, RMESEventArgs e) { if (e.MessageHead == null) { return; } if (e.MessageHead == "SN" || e.MessageHead == "CHECK") { string sn = e.MessageBody.ToString(); product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn);//获取sn信息 if (product != null) { TheSo = product.PLAN_SO; TheSn = product.SN; ThePlancode = product.PLAN_CODE; initInfo(""); } } //if (!string.IsNullOrWhiteSpace(e.MessageHead) && e.MessageHead == "PRCS") //{ // string msgbody = e.MessageBody as string; // if (string.IsNullOrWhiteSpace(msgbody)) return; // string processcode = ""; // if (msgbody.IndexOf('^') <= 0) //只发送了工序的信息 // processcode = msgbody; // else // processcode = msgbody.Split('^')[0].ToString(); // initInfo(processcode); //} //else if (e.MessageHead == "MESLL") //{ // this.Visible = false; // return; //} //if (e.MessageHead.ToString() == "WORK" || e.MessageHead.ToString() == "QUA") //{ // this.Visible = true; // return; //} //throw new NotImplementedException(); }
private void button1_Click_1(object sender, EventArgs e) { string sn11 = textBox1.Text.Trim().ToUpper(); ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(LoginInfo.CompanyInfo.COMPANY_CODE, sn11); if (product == null) { MessageBox.Show("该流水号不合法", "警告", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } try { Print(product); } catch (Exception e1) { MessageBox.Show(e1.Message, "提示"); } }
void ctrPlan_RMesDataChanged(object obj, RMESEventArgs e) { if (e.MessageHead == null) { return; } if (e.MessageHead == "SN") { string sn = e.MessageBody.ToString(); ProductInfoEntity ent = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn); if (ent != null) { planCode = ent.PLAN_CODE; initPlan(); InitPlan(planCode); return; } } }
private void txtLsh_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar != 13) { return; } if (string.IsNullOrWhiteSpace(txtLsh.Text)) { return; } string sn = txtLsh.Text.Trim().ToUpper(); if (sn.Length != 8) { txtLsh.Text = ""; MessageBox.Show("流水号位数为8位", "提示"); return; } product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn);//获取sn信息 if (product == null) { txtLsh.Text = ""; txtSo.Text = ""; txtPlan.Text = ""; txtJx.Text = ""; txtYh.Text = ""; txtYHH.Text = ""; txtFr.Text = ""; MessageBox.Show("流水号不合法", "提示"); return; } string thisyhdm = dataConn.GetValue(" select nvl(KHH,'') from atpuplannameplate where bzso='" + product.PLAN_SO + "' and plan_code='" + product.PLAN_CODE + "' "); string thisFr = dataConn.GetValue("select GET_FR('" + product.PLAN_SO + "','" + LoginInfo.ProductLineInfo.PLINE_CODE + "') from dual "); txtSo.Text = product.PLAN_SO; txtPlan.Text = product.PLAN_CODE; txtJx.Text = product.PRODUCT_MODEL; txtYh.Text = product.CUSTOMER_NAME; txtYHH.Text = thisyhdm; txtFr.Text = thisFr; cmdPrn_Click(cmdPrn, new EventArgs()); }
protected void ctrlNavigation_RmesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { //if (e.MessageHead == "QUACTRL") mnuQuality.Enabled = true; RMESEventArgs arg = new RMESEventArgs(); arg.MessageHead = ""; arg.MessageBody = ""; if (e.MessageHead == null) { return; } if (e.MessageHead == "SN" || e.MessageHead == "RECHECK" || e.MessageHead == "CHECKOK") { Thesn = e.MessageBody.ToString(); } if (e.MessageHead == "PRINTISDE") { string[] txt = e.MessageBody.ToString().Split('|'); TheSmTm = txt[0]; ThePlanCode = txt[1]; } if (e.MessageHead == "SHOWBOMLQ") { string txt = e.MessageBody.ToString(); ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(LoginInfo.CompanyInfo.COMPANY_CODE, txt); if (product == null) { return; } string oldplancode = ""; oldplancode = dataConn.GetValue("select jhmcold from atpujhsn where jhmc='" + product.PLAN_CODE + "' and is_valid='N' and rownum=1"); if (oldplancode == "") { return; } ProductInfoEntity productold = ProductInfoFactory.GetByCompanyCodeSNSingleLQ(LoginInfo.CompanyInfo.COMPANY_CODE, txt, oldplancode); oldPlinecode = productold.PLINE_CODE; } }
public ProductInfoReadDto UpdateProduct(ProductInfoDto productInfoDto) { var existingProductItem = _kubernetesClient.GetNamespacedCustomObject(ProductInfoEntity.CrdGroup, ProductInfoEntity.CrdApiVersion, Namespace, ProductInfoEntity.CrdPluralName, productInfoDto.Id) as JObject; var x = new ProductInfoEntity { ApiVersion = ProductInfoEntity.CrdGroup + "/" + ProductInfoEntity.CrdApiVersion, Kind = ProductInfoEntity.CrdKind, Metadata = { Name = productInfoDto.Id, ResourceVersion = existingProductItem["metadata"]["resourceVersion"].ToString() }, Spec = { MinimumQuantity = productInfoDto.MinimumQuantity, MaximumQuantity = productInfoDto.MaximumQuantity, Description = productInfoDto.Description } }; var body = JObject.FromObject(x, _camelCaseSerializer); //kubectl.exe get todospecs.experiments.sabba //kubectl.exe get todospecs.experiments.sabba--all - namespaces //var patch = new JsonPatchDocument<ToDoItemSpec>(); //patch.Replace(e => e.Spec.What , productInfoDto.What); //patch.Replace(e => e.Spec.When, productInfoDto.When); ////var body = JObject.FromObject(patch); //var list = _kubernetesClient.ApiClient.PatchNamespacedCustomObject(new V1Patch(patch), "experiments.sabba", "v1", "dev", "todoitemspecs", productInfoDto.Id) as JObject; var list = _kubernetesClient.ReplaceNamespacedCustomObject(body, ProductInfoEntity.CrdGroup, ProductInfoEntity.CrdApiVersion , Namespace, ProductInfoEntity.CrdPluralName, productInfoDto.Id) as JObject; return(new ProductInfoReadDto { Description = productInfoDto.Description, MinimumQuantity = productInfoDto.MinimumQuantity, MaximumQuantity = productInfoDto.MaximumQuantity, Id = productInfoDto.Id }); }
void ctrQuality_RMesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { string stationCode = LoginInfo.StationInfo.RMES_ID; if (e.MessageHead == null) { return; } if (e.MessageHead.ToString() == "SN") { SN = e.MessageBody as string; ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(LoginInfo.CompanyInfo.COMPANY_CODE, SN); if (product == null) { return; //SN = product.SN; } //质量点的sn与计划一一对应 此处只返回一条计划 _product = product; ShowQualityList(); } }
void ctrQuality_RMesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { string stationCode = LoginInfo.StationInfo.RMES_ID; if (e.MessageHead == null) { return; } if (e.MessageHead.ToString() == "SN") { SN = e.MessageBody as string; ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(LoginInfo.CompanyInfo.COMPANY_CODE, SN); if (product == null) { return; //SN = product.SN; } List <QualitySnItem> QualitySn = QualityFactory.GetAll(); GridQuality.DataSource = QualitySn; //ShowQualityList(); } }
private void 改制BOM对比清单ToolStripMenuItem_Click(object sender, EventArgs e) { //显示改制BOM对比清单 及 改制BOM扫描结果 及检测数据扫描结果 if (Thesn == "") { MessageBox.Show("请扫描发动机流水号", "提示"); return; } ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, Thesn);//获取sn信息 if (product == null) { MessageBox.Show("无此发动机信息", "提示"); return; } ThePlanCode = product.PLAN_CODE; FrmShowGZqd ps = new FrmShowGZqd(Thesn, ThePlanCode); ps.StartPosition = FormStartPosition.Manual; ps.StartPosition = FormStartPosition.CenterScreen; ps.Show(this); }
void ctrl_Tj_RMesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { RMESEventArgs arg = new RMESEventArgs(); arg.MessageHead = ""; arg.MessageBody = ""; if (e.MessageHead == null) { return; } if (e.MessageHead == "SN" || e.MessageHead == "RECHECK" || e.MessageHead == "CHECKOK") { string sn = e.MessageBody.ToString(); product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn);//获取sn信息 string str1 = ""; try { str1 = dataConn.GetValue("select fr from data_sn_fr where sn='" + sn + "' and plan_code='" + product.PLAN_CODE + "' "); } catch { } txtRemark.Text = str1 + "||" + product.REMARK; } }
public ProductInfoEntity Insert(ProductInfoEntity _ProductInfoEntity) { using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.SaveEntity(_ProductInfoEntity, true); } return _ProductInfoEntity; }
public ProductInfoEntity Insert(decimal PriceBuy, decimal PriceSell, string Currency, double CommissionPercent) { ProductInfoEntity _ProductInfoEntity = new ProductInfoEntity(); using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { _ProductInfoEntity.PriceBuy = PriceBuy; _ProductInfoEntity.PriceSell = PriceSell; _ProductInfoEntity.Currency = Currency; _ProductInfoEntity.CommissionPercent = CommissionPercent; adapter.SaveEntity(_ProductInfoEntity, true); } return _ProductInfoEntity; }
public bool Update(ProductInfoEntity _ProductInfoEntity) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { RelationPredicateBucket filter = new RelationPredicateBucket(); IPredicateExpression _PredicateExpression = new PredicateExpression(); _PredicateExpression.Add(ProductInfoFields.Id == _ProductInfoEntity.Id); filter.PredicateExpression.Add(_PredicateExpression); adapter.UpdateEntitiesDirectly(_ProductInfoEntity, filter); toReturn = true; } return toReturn; }
public ProductInfoEntity SelectOne(Guid Id) { ProductInfoEntity toReturn = null; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { ProductInfoEntity _ProductInfoEntity = new ProductInfoEntity(Id); if (adapter.FetchEntity(_ProductInfoEntity)) { toReturn = _ProductInfoEntity; } } return toReturn; }
void ctrl_Tj_RMesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { RMESEventArgs arg = new RMESEventArgs(); arg.MessageHead = ""; arg.MessageBody = ""; if (e.MessageHead == null) { return; } if (e.MessageHead == "SN" || e.MessageHead == "RESN" || e.MessageHead == "RECHECK") { TheSn = e.MessageBody.ToString(); product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, TheSn);//获取sn信息 if (product == null) { return; } ThePlancode = product.PLAN_CODE; //初始化质量数据 //string sql = "select count(1) from data_sn_qa where company_code='"+CompanyCode+"' and plan_code='"+product.PLAN_CODE+"' and sn='"+TheSn+"' and station_code='"+StationCode+"' and pline_code='"+PlineCode+"' "; //if (dataConn.GetValue(sql) == "0") //{ // //插入data_sn_qa // sql = " insert into data_sn_qa(rmes_id,sn,company_code,plan_code,pline_code,location_code,station_code,question,standard_answer,station_name) values " // + " select seq_rmes_id.nextval,'"+TheSn+"','" + CompanyCode + "','" + product.PLAN_CODE + "','" + PlineCode + "',gwdm,'" + StationCode + "',question,answer,'"+stationname+"' from RSTBOMQATS where zddm='" + StationCode + "' "; // dataConn.ExeSql(sql); //} string type = "B"; Thetype = type; string sn = TheSn; product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, TheSn);//获取sn信息 if (product == null) { return; } //执行存储过程 获取RSTBOMQATS ProductDataFactory.PL_QUERY_QAZJTS(product.PLAN_SO, StationCode, PlineCode, "", product.PLAN_CODE, sn); string sql = "select count(1) from data_sn_qa where company_code='" + CompanyCode + "' and plan_code='" + product.PLAN_CODE + "' and sn='" + TheSn + "' and station_code='" + StationCode + "' and pline_code='" + PlineCode + "' "; if (dataConn.GetValue(sql) == "0") { //插入data_sn_qa sql = " insert into data_sn_qa(rmes_id,sn,company_code,plan_code,pline_code,location_code,station_code,question,standard_answer,station_name) " + " select seq_rmes_id.nextval,'" + TheSn + "','" + CompanyCode + "','" + product.PLAN_CODE + "','" + PlineCode + "',gwdm,'" + StationCode + "',question,answer,'" + stationname + "' from RSTBOMQATS where zddm='" + StationCode + "' "; dataConn.ExeSql(sql); } ThePlancode = product.PLAN_CODE; GridQuality.Focus(); IsABC = false; ShowData(type, TheSn, StationCode);//A显示前道站点质量信息 B 显示当前站点质量信息 try { if (GridQuality.Rows.Count > 0 && IsABC) { PlanSnFactory.InitStationControl(CompanyCode, PlineID, LoginInfo.StationInfo.RMES_ID, product.PLAN_CODE, product.SN, "Rmes.WinForm.Controls.ctrl_quality"); dataConn.ExeSql("update data_sn_controls_complete set complete_flag='A' where station_code='" + LoginInfo.StationInfo.RMES_ID + "' and control_name='Rmes.WinForm.Controls.ctrl_quality' and sn='" + product.SN + "' and plan_code='" + product.PLAN_CODE + "' "); } } catch { } // } }
public bool Update(ProductInfoEntity _ProductInfoEntity, RelationPredicateBucket filter) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.UpdateEntitiesDirectly(_ProductInfoEntity, filter); toReturn = true; } return toReturn; }
ProductInfoEntity getProductInfo(ProductsEntity product) { ProductInfoEntity info = new ProductInfoEntity(); info.Id = product.Id; info.PriceSell = product.Price; info.PriceBuy = FNumber.ConvertDecimal(txtPricePo.Text.Trim()); info.Currency = "VND"; return info; }
public bool Update(Guid Id, decimal PriceBuy, decimal PriceSell, string Currency, double CommissionPercent) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { ProductInfoEntity _ProductInfoEntity = new ProductInfoEntity(Id); if (adapter.FetchEntity(_ProductInfoEntity)) { _ProductInfoEntity.PriceBuy = PriceBuy; _ProductInfoEntity.PriceSell = PriceSell; _ProductInfoEntity.Currency = Currency; _ProductInfoEntity.CommissionPercent = CommissionPercent; adapter.SaveEntity(_ProductInfoEntity, true); toReturn = true; } } return toReturn; }
void ctrlProductInfo_RMesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e) { if (e.MessageHead == null) { return; } if (e.MessageHead == "SN" || e.MessageHead == "ONLINE" || e.MessageHead == "OFFLINE" || e.MessageHead == "RECHECK" || e.MessageHead == "RESN") { //ProductInfoEntity product = e.MessageBody as ProductInfoEntity; string sn = e.MessageBody as string; ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(LoginInfo.CompanyInfo.COMPANY_CODE, sn); if (product == null) { return; } label1.Text = product.PLAN_CODE; //计划号 label2.Text = product.PLAN_SO; //SO label3.Text = product.PRODUCT_MODEL; //机型 //label2.BackColor = SystemColors.GradientInactiveCaption; } if (e.MessageHead == "FILLSN")//初始化控件 { string[] txt = e.MessageBody.ToString().Split('^'); string sn1 = txt[0]; label1.Text = txt[3]; //计划号 label2.Text = txt[1]; //SO label3.Text = txt[2]; //机型 } if (e.MessageHead == "FILLSN2") //初始化控件 { string[] txt = e.MessageBody.ToString().Split('^'); label1.Text = txt[2]; //计划号 label2.Text = txt[0]; //SO label3.Text = txt[1]; //机型 } if (e.MessageHead == "CLEAR") //初始化控件 { label1.Text = ""; //计划号 label2.Text = ""; //SO label3.Text = ""; //机型 } //////if (e.MessageHead == "YT") //////{ ////// label2.BackColor = Color.Green; //SO ////// label3.BackColor = Color.Green; //机型 //////} //////if (e.MessageHead == "JC") //////{ ////// label2.BackColor = Color.Red; //SO ////// label3.BackColor = Color.Red; //机型 //////} //////if (e.MessageHead == "FYT") //////{ ////// label2.BackColor = SystemColors.GradientInactiveCaption; //SO ////// label3.BackColor = SystemColors.GradientInactiveCaption; //机型 //////} //////if (e.MessageHead == "FJC") //////{ ////// label2.BackColor = SystemColors.GradientInactiveCaption; //SO ////// label3.BackColor = SystemColors.GradientInactiveCaption; //机型 //////} //else if(e.MessageHead==null) //{ // label1.Text = ""; // label2.Text = ""; // label3.Text = ""; //} //if (e.MessageHead == "SCP") //{ // label1.Text = ""; // label2.Text = ""; // label3.Text = ""; //} //if (e.MessageHead == "MESLL") //{ // this.Visible = false; // return; //} //if (e.MessageHead.ToString() == "WORK") //{ // this.Visible = true; // return; //} if (e.MessageHead == "JC") { label2.BackColor = Color.Red; } if (e.MessageHead == "FJC") { label2.BackColor = SystemColors.GradientInactiveCaption; } if (e.MessageHead == "YT") { label2.BackColor = Color.Green; //SO label3.BackColor = Color.Green; //机型 } if (e.MessageHead == "FYT") { label2.BackColor = SystemColors.GradientInactiveCaption; label3.BackColor = SystemColors.GradientInactiveCaption; //机型 } }