コード例 #1
0
        private void btnADD_Click(object sender, EventArgs e)
        {
            FrmUnusualStockInputAdd frm = new FrmUnusualStockInputAdd();
            frm.Tag = "JC_C_YCKC_ADD";
            if(frm.ShowDialog()==DialogResult.OK)
            {
                xpServerCollectionSource1.FixedFilterString = "[ZTID] = \'" + FrmLogin.getZTID + "\'";
                unitOfWork1.DropIdentityMap();
                xpServerCollectionSource1.Reload();

            }
        }
コード例 #2
0
        private void btnAlter_Click(object sender, EventArgs e)
        {
            bool fgcheck=false;
            string strid = "";
            if (selection.SelectedCount != 1)
            {
                fgcheck = false;
                MessageBox.Show("每次必须且只能选一个修改");
            }
            else
            {
                int RowIndex = selection.GetSelectedRowIndex(0);
                int RowHandle = gridView1.GetRowHandle(RowIndex);
                string strZT = gridView1.GetRowCellDisplayText(RowHandle, colCLZT).ToString().Trim();
                strid = gridView1.GetRowCellDisplayText(RowHandle, colYCKCID).ToString().Trim();

                if (strZT=="1")
                {
                    fgcheck = false;
                    MessageBox.Show("已经确认无法再修改");
                }
                else if (strZT == "0")
                {
                    fgcheck = true;

                }
                else
                {
                    fgcheck = false;
                    MessageBox.Show("请确认你选的单子");

                }
            }
            if(fgcheck==true)
            {
                FrmUnusualStockInputAdd frm = new FrmUnusualStockInputAdd(strid);
                frm.Tag = "JC_C_YCKC_EDIT";
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    selection.ClearSelection();

                    unitOfWork1.DropIdentityMap();
                    xpServerCollectionSource1.Reload();
                    SetCZLXMC();

                }
            }
        }
コード例 #3
0
 private void btnLook_Click(object sender, EventArgs e)
 {
     if (selection.SelectedCount != 1)
       {
           MessageBox.Show("每次必须且只能选一个查看");
       }
       else
       {
           int RowIndex = selection.GetSelectedRowIndex(0);
           int RowHandle = gridView1.GetRowHandle(RowIndex);
           string strid = gridView1.GetRowCellDisplayText(RowHandle, colYCKCID).ToString().Trim();
           FrmUnusualStockInputAdd frm = new FrmUnusualStockInputAdd(strid);
           frm.Tag = "JC_C_YCKC_LOOK";
           frm.ShowDialog();
       }
 }