コード例 #1
0
        public void infolistCellForNewDeliveryOrder(object sender, EventArgs e)
        {
            CommodityInfoforSearch commodityInfoforSearch = sender as CommodityInfoforSearch;
            string    strTableName   = "hypos_GOODSLST as hg left outer join HyLicence as hl on hg.licType =hl.licType and hg.domManufId =hl.licNo";
            string    strWhereClause = "hg.GDSNO ={0} AND ((hg.ISWS ='Y' and hg.CLA1NO ='0302' and hg.licType = hl.licType and hg.domManufId = hl.licNo) OR (hg.ISWS ='N' and hg.CLA1NO ='0302') OR hg.CLA1NO ='0303' OR hg.CLA1NO ='0305' OR hg.CLA1NO ='0308') AND (hl.isDelete='N' or hl.isDelete is null) ";
            DataTable dataTable      = (DataTable)DataBaseUtilities.DBOperation(Program.ConnectionString, TableOperation.Select, "hg.inventory,hg.GDSNO,hg.spec,hg.capacity,hg.GDName,hg.formCode,hg.CName,hg.contents,hg.brandName,hg.CLA1NO,hg.ISWS", strTableName, strWhereClause, "", null, new string[1]
            {
                commodityInfoforSearch.barcode
            }, CommandOperationType.ExecuteReaderReturnDataTable);
            DialogResult dialogResult = DialogResult.None;

            if (dataTable.Rows.Count > 0 && "0302".Equals(dataTable.Rows[0]["CLA1NO"].ToString()) && "Y".Equals(dataTable.Rows[0]["ISWS"].ToString()))
            {
                dialogResult = new dialogSetBatchNoAndMFGdate2(frmD, commodityInfoforSearch.barcode).ShowDialog();
            }
            else
            {
                frmD.addOnecommodity(sender, e, commodityInfoforSearch.barcode);
                frmD.Show();
                Close();
            }
            if (dialogResult == DialogResult.Yes)
            {
                frmD.addOnecommodity(sender, e, commodityInfoforSearch.barcode);
                frmD.Show();
                Close();
            }
        }
コード例 #2
0
 private void cancel_Click(object sender, EventArgs e)
 {
     if (frmD != null)
     {
         frmD.Location = new Point(base.Location.X, base.Location.Y);
         frmD.setfocus();
         frmD.Show();
     }
     Hide();
 }