コード例 #1
0
    protected void BindGrid()
    {
        try
        {
            objBE.Action = "R";

            objBE.Dept = Department;
            dt         = ObjDL.CropVarietyIUDR(objBE, con);
            if (dt.Rows.Count > 0)
            {
                GvCropVariety.DataSource = dt;
                GvCropVariety.DataBind();
            }
            else
            {
                GvCropVariety.DataSource = null;
                GvCropVariety.DataBind();
                cf.ShowAlertMessage("No Data");
            }
        }
        catch (Exception ex)
        {
            ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
            cf.ShowAlertMessage(ex.ToString());
        }
    }
コード例 #2
0
 protected void BindCropVariety()
 {
     objBE.Action = "R1";
     objBE.Dept   = Department;
     objBE.Cropid = ddlcrop.SelectedValue;
     dt           = ObjDL.CropVarietyIUDR(objBE, con);
     cf.BindDropDownLists(ddlcropvariety, dt, "CropVName", "CropVCode", "0");
 }