Пример #1
0
        private void gridIssueHistoryHD_HyperLinkClick(object Sender, FlexCell.Grid.HyperLinkClickEventArgs e)
        {
            e.URL     = null;
            e.Changed = true;
            int isno = Convert.ToInt32(gridIssueHistoryHD.Cell(e.Row, e.Col).Text);

            IssueHistoryDTL(isno);
        }
Пример #2
0
 private void grid1_HyperLinkClick(object Sender, FlexCell.Grid.HyperLinkClickEventArgs e)
 {
     e.Changed = true;
     e.URL     = "";
     if (grid1.Cell(e.Row, e.Col).Text == "View")
     {
         filldetailsgrid(e.Row, grid1.Cols);
     }
 }
Пример #3
0
        private void gridReqHisHD_HyperLinkClick(object Sender, FlexCell.Grid.HyperLinkClickEventArgs e)
        {
            e.URL     = null;
            e.Changed = true;
            int reqno = Convert.ToInt32(gridReqHisHD.Cell(e.Row, e.Col).Text);

            gridReqHisMatDTLShow(reqno);
            IssueHistorySummary(reqno);
            IssueHistoryDetails(reqno);
            txtDisplayMatReqNo.Text = reqno.ToString();
            if (chbMreq.Checked == true)
            {
                cmbMatReq.SelectedValue = reqno;
                txtMatReqNo.Text        = reqno.ToString();
            }
        }
Пример #4
0
        private void grid1_HyperLinkClick(object Sender, FlexCell.Grid.HyperLinkClickEventArgs e)
        {
            try
            {
                e.URL     = null;
                e.Changed = true;
                if (e.Col == 1)
                {
                    if (grid1.Cell(grid1.ActiveCell.Row, 1).Text == "New")
                    {
                        lr        = 1;
                        e.URL     = null;
                        e.Changed = true;
                        lockorunlock(grid1.ActiveCell.Row, 1);
                        grid1.Cell(grid1.ActiveCell.Row, 10).Text = "Save";
                        grid1.Cell(grid1.ActiveCell.Row, 11).Text = "Cancel";
                        grid1.Cell(grid1.ActiveCell.Row, 3).SetFocus();
                        int id = ReadLastNum();
                        grid1.Cell(grid1.ActiveCell.Row, 2).Text = id.ToString();
                    }

                    else
                    {
                        lockorunlock(grid1.ActiveCell.Row, 1);
                        grid1.Cell(grid1.ActiveCell.Row, 3).SetFocus();
                        grid1.Cell(grid1.ActiveCell.Row, 10).Text = "update";
                        grid1.Cell(grid1.ActiveCell.Row, 11).Text = "Cancel";
                        edit = 1;
                        lr   = 1;
                    }
                }

                if (e.Col == 10)
                {
                    lr = 0;
                    if (grid1.Cell(grid1.ActiveCell.Row, 10).Text == "Save")
                    {
                        if (grid1.Cell(grid1.ActiveCell.Row, 3).Text.Trim().Length == 0)
                        {
                            grid1.Cell(grid1.ActiveCell.Row, 3).SetFocus();
                            return;
                        }
                        if (grid1.Cell(grid1.ActiveCell.Row, 4).Text.Trim().Length == 0)
                        {
                            grid1.Cell(grid1.ActiveCell.Row, 4).SetFocus();
                            return;
                        }
                        if (grid1.Cell(grid1.ActiveCell.Row, 5).Text.Trim().Length == 0)
                        {
                            grid1.Cell(grid1.ActiveCell.Row, 5).SetFocus();
                            return;
                        }
                        if (grid1.Cell(grid1.ActiveCell.Row, 6).Text.Trim().Length == 0)
                        {
                            grid1.Cell(grid1.ActiveCell.Row, 6).SetFocus();
                            return;
                        }
                        if (grid1.Cell(grid1.ActiveCell.Row, 7).Text.Trim().Length == 0)
                        {
                            grid1.Cell(grid1.ActiveCell.Row, 7).SetFocus();
                            return;
                        }
                        if (grid1.Cell(grid1.ActiveCell.Row, 8).Text.Trim().Length == 0)
                        {
                            grid1.Cell(grid1.ActiveCell.Row, 8).SetFocus();
                            return;
                        }
                        Insertmachine();
                        InsertlastMachneemp();
                        string s = (grid1.ActiveCell.Row).ToString();
                        grid1.Cell(grid1.ActiveCell.Row + 1, 1).Text = "New";
                    }
                    else
                    {
                        if (edit == 1)
                        {
                            UpdateMachine();
                            grid1.Cell(grid1.ActiveCell.Row, 11).Text = "";
                            grid1.Cell(grid1.ActiveCell.Row, 10).Text = "";
                        }
                    }
                }
                if (e.Col == 11)
                {
                    lr = 0;
                    if (grid1.Cell(grid1.ActiveCell.Row, 1).Text == "New")
                    {
                        cleargrid();
                        lockorunlock(grid1.ActiveCell.Row, 0);
                    }
                    else
                    {
                        if (edit == 1)
                        {
                            EditCancelMachine();
                            lockorunlock(grid1.ActiveCell.Row, 0);
                            edit = 0;
                        }
                    }
                }
            }
            catch
            {
                MessageBox.Show("Machine No already exits");
                cleargrid();
                lockorunlock(grid1.ActiveCell.Row, 0);
            }
        }