コード例 #1
0
        private void bttIssIssue_Click(object sender, EventArgs e)
        {
            int tmpID;

            tmpID = Convert.ToInt32(lvwIssuances.SelectedItems[0].Text);

            //DataSet ds = CBTransmittalRelease.GetIssueReleaseForReport(tmpID);

            //CPTransmittal.ShowTestIssuance(ds);

            CBTransmittalRelease.SetPrintDate(tmpID);

            LoadStatusListIssuance();
            LoadStatusListForTrans();
        }
コード例 #2
0
        private void LoadStatusListAll()
        {
            SqlDataReader dr;
            ListViewItem  lvi;
            string        tmpDate;

            lvwIssueList.Items.Clear();

            dr = CBTransmittalRelease.GetListForStatus();

            while (dr.Read())
            {
                lvi = new ListViewItem();

                lvi.Text = dr["ID"].ToString();
                lvi.SubItems.Add(Convert.ToDateTime(dr["DateIssued"]).ToShortDateString());
                lvi.SubItems.Add(dr["Number"].ToString());
                lvi.SubItems.Add(dr["IssuedBy"].ToString());
                lvi.SubItems.Add(dr["ReleaseFor"].ToString());
                lvi.SubItems.Add(dr["DocCnt"].ToString());

                tmpDate = dr["DateIssued"].ToString();
                if (tmpDate.Length > 0)
                {
                    lvi.SubItems.Add(Convert.ToDateTime(tmpDate).ToShortDateString());
                }
                else
                {
                    lvi.SubItems.Add("");
                }

                lvi.SubItems.Add(dr["TransNum"].ToString());

                tmpDate = dr["TransDate"].ToString();
                if (tmpDate.Length > 0)
                {
                    lvi.SubItems.Add(Convert.ToDateTime(tmpDate).ToShortDateString());
                }
                else
                {
                    lvi.SubItems.Add("");
                }

                lvwIssueList.Items.Add(lvi);
            }

            dr.Close();
        }
コード例 #3
0
        public static void PrintTransmittalRelease(int releaseID)
        {
            rprtTransmittalRelease1 rprt = new rprtTransmittalRelease1();
            DataSet    ds;
            FPreviewAR pv = new FPreviewAR();


            CBProject            proj = new CBProject(); //***********************************Added 9/30/2015
            CBTransmittalRelease r    = new CBTransmittalRelease();

            r.Load(releaseID);
            proj.Load(r.ProjectID);
            pv.projNumber = proj.Number;

            ds = CBTransmittalRelease.GetTransmittalReleaseForReport(releaseID);

            rprt.DataSource = ds;
            rprt.DataMember = "Table";
            pv.ViewReport(rprt);
            pv.ShowDialog();
        }
コード例 #4
0
        private void bttIssCanc_Click(object sender, EventArgs e)
        {
            int    tmpID;
            string desc;

            tmpID = Convert.ToInt32(lvwIssuances.SelectedItems[0].Text);
            ListViewItem lvi = lvwIssuances.SelectedItems[0];

            desc = lvi.SubItems[1].Text + " - " + lvi.SubItems[2].Text + " - " + lvi.SubItems[3].Text + " - " + lvi.SubItems[4].Text;

            DialogResult retVal = MessageBox.Show("Are you sure that you wise to remove " + desc + " ?", "Remove Issuance", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (retVal == DialogResult.Yes)
            {
                CBTransmittalRelease.Delete(tmpID);

                LoadStatusListAll();
                LoadStatusListIssuance();
                LoadStatusListForTrans();
            }
        }