private void BtnConfirmNot_Click(object sender, EventArgs e) { try { switch (ctrlType) { case "正在审核": break; case "待发货": applicationInfo.DeliverConfirm(applicationInfo.CtrlID, txtBeforeChecked.Text, Login.LoginUser, 2); break; case "待收货": applicationInfo.ReceiptConfirm(applicationInfo.CtrlID, txtAfterChecked.Text, Login.LoginUser, 3); break; default: break; } MessageBox.Show("确认成功", "消息", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show("确认失败,错误信息:" + ex.Message); } }
private void BtnSubmitAddApp_Click(object sender, EventArgs e) { BaseData.Store store = new BaseData.Store(); //if (store.SelectStoreInfoByStoreName(txtDeliverStore4.Text).Rows.Count == 0 || store.SelectStoreInfoByStoreName(txtReceiptStore4.Text).Rows.Count == 0) //{ // MessageBox.Show("收发店铺名错误"); //} if (txtWuliuID.Text.Length < 1 && DeliverOrReceipt == "待发货") { MessageBox.Show("请填写物流单号"); } else if (AddApplicationDT.Rows.Count == 0) { MessageBox.Show("申请表中未添加转货内容"); } else if (txtCtrlID.Text == null || txtCtrlID.Text.Length == 0) { MessageBox.Show("请填写控制单号"); } else { DataTable AddAppInfoDT = applicationInfo.SelectApplicationByCtrlID(applicationInfo.CtrlID); if (AddAppInfoDT.Rows.Count > 0) { AddAppInfoDT.Rows[0]["WuliuID"] = txtWuliuID.Text; if (DeliverOrReceipt == "待发货") { AddAppInfoDT.Rows[0]["DeliverDate"] = dtAppDate.Value; AddAppInfoDT.Rows[0]["DeliverCheck"] = txtStoreCheck.Text; } else if (DeliverOrReceipt == "待收货") { AddAppInfoDT.Rows[0]["ReceiptDate"] = dtAppDate.Value; AddAppInfoDT.Rows[0]["ReceiptCheck"] = txtStoreCheck.Text; } } try { if (DeliverOrReceipt == "待发货") { applicationDetail.UpdateDeliverDetail(AddApplicationDT); applicationInfo.UpdateApplicationInfo(AddAppInfoDT); applicationInfo.DeliverConfirm(applicationInfo.CtrlID, txtStoreCheck.Text, Login.LoginUser, 1); Thread thread = new Thread(new ThreadStart(SendEmailtoReceipt)); thread.Start(); } else if (DeliverOrReceipt == "待收货") { applicationDetail.UpdateReceiptDetail(AddApplicationDT); applicationInfo.UpdateApplicationInfo(AddAppInfoDT); applicationInfo.ReceiptConfirm(applicationInfo.CtrlID, txtStoreCheck.Text, Login.LoginUser, 1); Thread thread = new Thread(new ThreadStart(SendEmailtoWuliu)); thread.Start(); } MessageBox.Show("提交成功", "消息", MessageBoxButtons.OK, MessageBoxIcon.Information); DialogResult = DialogResult.OK; this.Close(); } catch (Exception ex) { MessageBox.Show("提交失败,错误信息:" + ex.Message); } } }