Example #1
0
        protected void gridResponse_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            // String MilestoneID = Session["MilestoneID"].ToString();
            String       ItemID       = Session["ItemKey"].ToString();
            ASPxGridView gridResponse = (ASPxGridView)sender;

            ASPxHtmlEditor txResponse = (ASPxHtmlEditor)gridResponse.FindEditFormLayoutItemTemplateControl("txResponse");

            AssessmentResponse UpdateResponse = new AssessmentResponse
            {
                ResponseID    = Guid.Parse(e.Keys["ResponseID"].ToString()),
                MilestoneName = e.NewValues["MilestoneName"].ToString(),
                ItemKey       = Guid.Parse(ItemID),
                // MilestoneID = Guid.Parse(""),

                Response = txResponse.Html
            };

            rc_services.SaveResponse(UpdateResponse);

            e.Cancel = true;
            gridResponse.DataSource = rc_services.GetResponse(Guid.Parse(ItemID));
            gridResponse.DataBind();
            gridResponse.CancelEdit();

            BindMainGrids();
        }
Example #2
0
        protected void DELSGridView_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            try
            {
                DELSDataTable = (DataTable)Session["DELStable"];
                if (Session["DELSDataTable"] != null && Session["DELSDataTable"] != "")
                {
                    DELSDataTable = Session["DELSDataTable"] as DataTable;
                }
                ASPxGridView gridView = (ASPxGridView)sender;
                //6/24/2015 NS added for VSPLUS-1838

                ASPxTextBox  txtKeyword            = (ASPxTextBox)DELSGridView.FindEditFormTemplateControl("LogFileTextBox");
                ASPxTextBox  txtNotRequiredKeyword = (ASPxTextBox)DELSGridView.FindEditFormTemplateControl("NotLogFileTextBox");
                ASPxCheckBox LogFileCheckBox       = (ASPxCheckBox)DELSGridView.FindEditFormTemplateControl("LogFileCheckBox");
                ASPxCheckBox logCheckBox           = (ASPxCheckBox)DELSGridView.FindEditFormTemplateControl("logCheckBox");
                ASPxCheckBox AgentlogCheckBox      = (ASPxCheckBox)DELSGridView.FindEditFormTemplateControl("AgentlogCheckBox");

                gridView.DoRowValidation();

                UpdateData("Update", GetRow(DELSDataTable, e.NewValues.GetEnumerator(), Convert.ToInt32(e.Keys[0])));
                //Update Grid after inserting new row, refresh grid as in page load
                gridView.CancelEdit();
                e.Cancel = true;
                FillDELSGridfromSession();
            }
            catch (Exception ex)
            {
                successDiv.InnerHtml = msgloc.ToString() + "Success." +
                                       "<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>";
                successDiv.Style.Value = "display: block";
            }
        }
Example #3
0
        protected void ELSGridView_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            ELSDataTable = (DataTable)Session["ELS"];
            ASPxGridView gridView = (ASPxGridView)sender;

            UpdateEventMasterData("Update", GetRow(ELSDataTable, e.NewValues.GetEnumerator(), Convert.ToInt32(e.Keys[0])));
            gridView.CancelEdit();
            e.Cancel = true;
            fillData(EventKey);

            successDiv.InnerHtml = msgloc.ToString() + "Success." +
                                   "<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>";
            successDiv.Style.Value = "display: block";
        }
Example #4
0
        protected void updateMediatora(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            string txt = mediatorzy.SelectCommand;

            //dane osobowe
            e.NewValues["tytul"]           = nm.controlText("txTytul", grid);
            e.NewValues["imie"]            = nm.controlText("txImie", grid);
            e.NewValues["nazwisko"]        = nm.controlText("txNazwisko", grid);
            e.NewValues["data_poczatkowa"] = nm.controlTextDate("txPoczatekPowolania", grid);
            e.NewValues["data_koncowa"]    = nm.controlTextDate("txDataKoncaPowolania", grid);
            if (nm.controlText("txPESEL", grid) == null)
            {
                e.NewValues["Pesel"] = 0;
            }
            else
            {
                e.NewValues["Pesel"] = nm.controlText("txPESEL", grid);
            }
            //d_zawieszenia

            var cos = (string)Session["czy_zawN"]; //nm.controlCheckbox("cbZawieszenie", grid);

            e.NewValues["czy_zaw"] = false;

            if (cos == "1")
            {
                e.NewValues["czy_zaw"] = true;
                DateTime poczZaw = (DateTime)Session["poczatekZawieszeniaN"];
                DateTime konZaw  = (DateTime)Session["koniecZawieszeniaN"];

                e.NewValues["d_zawieszenia"]        = poczZaw;
                e.NewValues["dataKoncaZawieszenia"] = konZaw;
            }
            //dane adresowe
            e.NewValues["ulica"]       = nm.controlText("txAdres", grid);
            e.NewValues["kod_poczt"]   = nm.controlText("txKodPocztowy", grid);
            e.NewValues["miejscowosc"] = nm.controlText("txMiejscowosc", grid);
            e.NewValues["tel1"]        = nm.controlText("txTelefon1", grid);
            e.NewValues["tel2"]        = nm.controlText("txTelefon2", grid);
            e.NewValues["email"]       = nm.controlText("txEmail", grid);
            //dane korespondencyjne
            e.NewValues["adr_kores"]       = nm.controlText("txAdresKorespondencyjny", grid);
            e.NewValues["kod_poczt_kor"]   = nm.controlText("txKodPocztowyKorespondencyjny", grid);
            e.NewValues["miejscowosc_kor"] = nm.controlText("txMiejscowoscKorespondencyjny", grid);
            // uwagi i specjalizacje
            e.NewValues["uwagi"] = nm.controlTextMemo("txUwagi", grid);
            e.NewValues["specjalizacja_opis"] = nm.controlTextMemo("txSpecjalizacjeOpis", grid);
            e.NewValues["instytucja"]         = nm.controlText("txInstytucja", grid);
        }
Example #5
0
        protected void gridFrontMatter_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            ASPxHtmlEditor txtDescription  = (ASPxHtmlEditor)gridFrontMatter.FindEditFormLayoutItemTemplateControl("txtDescription");
            FrontMatter    EditFrontMatter = new FrontMatter();

            EditFrontMatter.FrontMatterID = e.Keys["FrontMatterID"].ToString();
            EditFrontMatter.Name          = e.NewValues["Name"].ToString();
            EditFrontMatter.Description   = txtDescription.Html;



            rtm_services.UpdateFrontMatter(EditFrontMatter);
            e.Cancel = true;
            var projectId = Session["projectID"].ToString();

            gridFrontMatter.DataSource = rtm_services.GetFrontMatter(projectId);
            gridFrontMatter.DataBind();
            gridFrontMatter.CancelEdit();
        }
Example #6
0
        protected void gridChannels_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            try
            {
                SessionManager.IsEditFormCreated = false;
                int keyToUpdate    = int.Parse(e.Keys[0].ToString());
                int newChannelType = int.Parse(Utilities.GetEditFormComboValue(gridChannels, "cmbEfType").ToString());
                int newInfoType    = int.Parse(Utilities.GetEditFormComboValue(gridChannels, "cmbEfInfoType").ToString());
                if ((newChannelType != 0) && (newInfoType != 0))
                {
                    //update channel
                    CanonChannel cc = new CanonChannel();
                    cc.ChannelName = e.NewValues["ChannelName"].ToString();
                    cc.ChannelType = newChannelType;
                    cc.InfoType    = newInfoType;
                    if (e.NewValues["IsActive"] != null)
                    {
                        cc.IsActive = (bool)e.NewValues["IsActive"];
                    }
                    else
                    {
                        cc.IsActive = false;
                    }
                    cc.Url         = e.NewValues["Url"].ToString();
                    cc.ReportingTo = e.NewValues["ReportingTo"].ToString();
                    CanonChannel.UpdateChannelById(keyToUpdate, cc);
                }

                e.Cancel = true;
                gridChannels.CancelEdit();
                this.BindData();
            }
            catch (Exception ex)
            {
                Logger.Log(string.Format("exception {0}", ex.ToString()), LogLevel.Error);
            }
        }
 protected void grid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
 {
     UpdateWCItem(e.Keys, e.NewValues);
     CancelWCEditing(e);
 }
Example #8
0
 protected void ASPxGridViewUsers_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
 {
     e.Cancel = false;
     ASPxGridViewUsers.CancelEdit();
     ASPxGridViewUsers.DataBind();
 }
Example #9
0
 /// <summary>
 /// RowUpdating event on grid view. The same with RowInserting, foreign key value can be taken from masteter grid view.
 /// </summary>
 /// <param name="sender">Grid view sending the event.</param>
 /// <param name="e">Event args containing data being updated.</param>
 void detailGrid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
 {
     e.NewValues[foreignKey.Name] = (sender as ASPxGridView).GetMasterRowKeyValue();
 }