Exemplo n.º 1
0
 protected void gvInwarddtl_SelectedIndexChanged(object sender, EventArgs e)
 {
     //Setting the MultiView
     mvInward.SetActiveView(mvInward.Views[1]);
     //Changing the Mode of the FormView.
     FormView_Inward.ChangeMode(FormViewMode.Edit);
     //DetailsView1.ChangeMode(DetailsViewMode.Edit);
 }
Exemplo n.º 2
0
    protected void FormView_Inward_ItemInserting(object sender, FormViewInsertEventArgs e)
    {
        DropDownList dropDownOffice = FormView_Inward.FindControl("dropdownlistSentTo") as DropDownList;

        e.Values["SentTo"]             = dropDownOffice.SelectedValue;
        e.Values["Document_Upload_Id"] = ViewState["documentUploadId"];
        //e.Values["InwardNo"] +=(@"\"+dropDownOffice.SelectedValue);
    }
Exemplo n.º 3
0
    protected void btnNew_Click(object sender, EventArgs e)
    {
        mvInward.SetActiveView(mvInward.Views[1]);

        FormView_Inward.ChangeMode(FormViewMode.Insert);

        // serial number should come instead of 1

        //((TextBox)FvInward.FindControl("txtInwardNo")).Text="IGR/1/2012";
    }
Exemplo n.º 4
0
 protected void gvInwarddtl_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     switch (e.CommandName)
     {
     case "Modify":
         mvInward.SetActiveView(vieFv);
         FormView_Inward.ChangeMode(FormViewMode.Edit);
         FormView_Inward.PageIndex = Convert.ToInt32(e.CommandArgument);
         break;
     }
 }
Exemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //vieGrid.Visible = true;
        //vieFv.Visible = false;
        if (!IsPostBack)
        {
            switch (Request.Params["Mode"])
            {
            case "DataEntry":
                mvInward.SetActiveView(mvInward.Views[1]);
                FormView_Inward.ChangeMode(FormViewMode.Insert);
                break;

            case "Verify":
                mvInward.SetActiveView(mvInward.Views[0]);
                break;

            case "ReadOnly":
                Response.Redirect("~/Inward-Outward/InwardOutwardReport.aspx");
                break;
            }
        }


        if (FormView_Inward.CurrentMode == FormViewMode.Insert)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwarddoctype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWDOCTYPE");
            //Binding XmlDataSource
            XmlInwarddoctype.DataBind();
            //Calling Bll method and storing result into XmlDataSource
            //XmlInwardtype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWTYPE");
            //Binding XmlDataSource
            //XmlInwardtype.DataBind();
        }
        if (FormView_Inward.CurrentMode == FormViewMode.Edit)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwarddoctype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWDOCTYPE");
            //Binding XmlDataSource
            XmlInwarddoctype.DataBind();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwardtype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWTYPE");
            //Binding XmlDataSource
            XmlInwardtype.DataBind();
        }
    }
Exemplo n.º 6
0
    protected void FormView_Inward_ItemCommand(object sender, FormViewCommandEventArgs e)
    {
        switch (e.CommandName)
        {
        case "Back":
            mvInward.SetActiveView(vieGrid);
            gvInwarddtl.DataBind();
            break;

        case "UploadFile":

            FileUpload FileUploadDocument = FormView_Inward.FindControl("FileUploadDocument") as FileUpload;
            string     uploadedPath       = UploadFile(FileUploadDocument);
            if (string.IsNullOrEmpty(uploadedPath) == false)
            {
                // write the code to insert a new entry to Document_Upload
                Document_UploadTableAdapter documentUploader = new Document_UploadTableAdapter();
                string fileName         = System.IO.Path.GetFileName(FileUploadDocument.PostedFile.FileName);
                int    documentUploadId = Convert.ToInt32(documentUploader.UploadNewDocument(fileName, string.Empty, uploadedPath));
                ViewState["documentUploadId"] = documentUploadId;
            }
            break;
        }
    }